Skip to content

Commit ac7ef92

Browse files
author
Jerry Cheung
committed
Auth::Digest spec doesn't depend on versioning
1 parent bb6283e commit ac7ef92

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

spec/grape/middleware/auth/digest_spec.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
end
1010

1111
class Test < Grape::API
12-
version '1'
13-
1412
http_digest({:realm => 'Test Api', :opaque => 'secret'}) do |username|
1513
{'foo' => 'bar'}[username]
1614
end
@@ -26,24 +24,24 @@ def app
2624
end
2725

2826
it 'should be a digest authentication challenge' do
29-
get '/1/test'
27+
get '/test'
3028
last_response.should be_challenge
3129
end
3230

3331
it 'should throw a 401 if no auth is given' do
34-
get '/1/test'
32+
get '/test'
3533
last_response.status.should == 401
3634
end
3735

3836
it 'should authenticate if given valid creds' do
3937
digest_authorize "foo", "bar"
40-
get '/1/test'
38+
get '/test'
4139
last_response.status.should == 200
4240
end
4341

4442
it 'should throw a 401 if given invalid creds' do
4543
digest_authorize "bar", "foo"
46-
get '/1/test'
44+
get '/test'
4745
last_response.status.should == 401
4846
end
4947
end

0 commit comments

Comments
 (0)