rswagged financial_transactions
This commit is contained in:
parent
305d1055c4
commit
ecf5c6e1d4
3 changed files with 42 additions and 38 deletions
|
|
@ -18,6 +18,18 @@ module ApiHelper
|
|||
end
|
||||
end
|
||||
|
||||
def self.it_handles_invalid_token_with_id(class_sym)
|
||||
context 'with invalid access token' do
|
||||
let(:Authorization) { 'abc' }
|
||||
let(:id) { create(class_sym).id }
|
||||
|
||||
response 401, 'not logged-in' do
|
||||
schema '$ref' => '#/components/schemas/Error401'
|
||||
run_test!
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def self.it_handles_invalid_scope
|
||||
context 'with invalid scope' do
|
||||
let(:api_scopes) { ['none'] }
|
||||
|
|
@ -29,6 +41,18 @@ module ApiHelper
|
|||
end
|
||||
end
|
||||
|
||||
def self.it_handles_invalid_scope_with_id(class_sym)
|
||||
context 'with invalid scope' do
|
||||
let(:api_scopes) { ['none'] }
|
||||
let(:id) { create(class_sym).id }
|
||||
|
||||
response 403, 'missing scope' do
|
||||
schema '$ref' => '#/components/schemas/Error403'
|
||||
run_test!
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def self.it_handles_invalid_token_and_scope(*args)
|
||||
it_handles_invalid_token(*args)
|
||||
it_handles_invalid_scope(*args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue