spec/grape/middleware/auth/digest_spec.rb in grape-0.7.0 vs spec/grape/middleware/auth/digest_spec.rb in grape-0.8.0
- old
+ new
@@ -23,25 +23,25 @@
Test
end
it 'is a digest authentication challenge' do
get '/test'
- last_response.should be_challenge
+ expect(last_response).to be_challenge
end
it 'throws a 401 if no auth is given' do
get '/test'
- last_response.status.should == 401
+ expect(last_response.status).to eq(401)
end
it 'authenticates if given valid creds' do
digest_authorize "foo", "bar"
get '/test'
- last_response.status.should == 200
+ expect(last_response.status).to eq(200)
end
it 'throws a 401 if given invalid creds' do
digest_authorize "bar", "foo"
get '/test'
- last_response.status.should == 401
+ expect(last_response.status).to eq(401)
end
end