File: exception_spec.rb

package info (click to toggle)
ruby-swd 2.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 184 kB
  • sloc: ruby: 510; makefile: 6
file content (26 lines) | stat: -rw-r--r-- 594 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require 'spec_helper'

describe SWD::HttpError do
  subject do
    SWD::HttpError.new 400, 'Bad Request', 'Message'
  end

  its(:status)   { should == 400 }
  its(:message)  { should == 'Bad Request' }
  its(:response) { should == 'Message' }
end

describe SWD::BadRequest do
  its(:status)  { should == 400 }
  its(:message) { should == 'SWD::BadRequest' }
end

describe SWD::Unauthorized do
  its(:status)  { should == 401 }
  its(:message) { should == 'SWD::Unauthorized' }
end

describe SWD::Forbidden do
  its(:status)  { should == 403 }
  its(:message) { should == 'SWD::Forbidden' }
end