Skip to content

Commit

Permalink
Add extra tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mayorova committed Jan 15, 2025
1 parent d347171 commit 4927b13
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions test/integration/authrep/response_codes_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,19 @@ def setup
end

test_authrep "ignore invalid log param" do |e|
get e, {
provider_key: @provider_key,
app_id: @application.id,
usage: { 'hits' => 1 },
log: 'some-string'
}

enqueued_job = Resque.list_range(:priority)

# transactions is the second arg ([1]), we only sent one (['0'])
transaction = enqueued_job['args'][1]['0']
assert_nil transaction['log']
["some-string", ["array-element"], "", nil].each do |log_value|
get e, {
provider_key: @provider_key,
app_id: @application.id,
usage: { 'hits' => 1 },
log: log_value
}

enqueued_job = Resque.list_range(:priority)

# transactions is the second arg ([1]), we only sent one (['0'])
transaction = enqueued_job['args'][1]['0']
assert_nil transaction['log']
end
end
end

0 comments on commit 4927b13

Please sign in to comment.