Created
June 25, 2012 14:08
-
-
Save vidmantas/2988862 to your computer and use it in GitHub Desktop.
undefined method 'post'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# file located spec/mapi/v1/authentication_spec.rb | |
# exception: | |
# NoMethodError: | |
# undefined method `post' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0xc652514> | |
# # ./spec/mapi/v1/authentication_spec.rb:6:in `block (3 levels) in <top (required)>' | |
require 'spec_helper' | |
describe Mapi::V1::SessionsController, :type => :api do | |
context 'unsuccessful authentication' do | |
it 'should not authenticate on wrong credentials' do | |
post '/mapi/v1/login', email: '[email protected]', password: 'wrong', device_id: '123456789abc' | |
response.code.should == '401' | |
JSON.parse(response.body).should == { :maintenance => 0 } | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment