mirror of
https://github.com/internetee/registry.git
synced 2025-07-02 17:23:34 +02:00
Return error when API user not found in REPP #2774
This commit is contained in:
parent
1b9bc92660
commit
f2992b7f45
3 changed files with 15 additions and 0 deletions
|
@ -77,5 +77,14 @@ describe Repp::DomainV1 do
|
|||
|
||||
# TODO: Log failed API requests too
|
||||
end
|
||||
|
||||
it 'returns an error with invalid credentials' do
|
||||
invalid_user = OpenStruct.new(username: 'bla', password: 'blabala')
|
||||
get_with_auth '/repp/v1/domains', {}, invalid_user
|
||||
response.status.should == 401
|
||||
|
||||
body = JSON.parse(response.body)
|
||||
body['error'].should == 'API user not found'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue