Skip to content

Commit

Permalink
Define BasicAuthenticationTests to test Basic Authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
KitaitiMakoto committed Feb 6, 2016
1 parent 2a95bb2 commit 9dccdea
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/test-client.rb
Expand Up @@ -255,6 +255,19 @@ def test_load_array
end
end

module BasicAuthenticationTests
def setup
@auth_user = 'Aladdin'
@auth_password = 'open sesame'
end

def test_request_header
stub_response('[]')
client.status
assert_equal 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==', @request_headers['authorization']
end
end

module Tests
include Utils
include Assertions
Expand Down

0 comments on commit 9dccdea

Please sign in to comment.