test/remote_test.rb in 3scale_client-2.5.0 vs test/remote_test.rb in 3scale_client-2.6.0
- old
+ new
@@ -2,11 +2,11 @@
require '3scale/client'
if ENV['TEST_3SCALE_PROVIDER_KEY'] &&
ENV['TEST_3SCALE_APP_IDS'] &&
ENV['TEST_3SCALE_APP_KEYS']
- class ThreeScale::RemoteTest < MiniTest::Unit::TestCase
+ class ThreeScale::RemoteTest < MiniTest::Test
def setup
@provider_key = ENV['TEST_3SCALE_PROVIDER_KEY']
stripper = lambda { |string| string.strip }
@@ -80,10 +80,12 @@
assert_equal 'application with id="invalid-id" was not found', response.error_message
end
def test_successful_report
transactions = @app_ids.map do |app_id|
- {:app_id => app_id, :usage => {'hits' => 1}}
+ {:app_id => app_id,
+ :usage => {'hits' => 1},
+ :log => {:request => "a/a", :response => "b/b", :code => 200 }}
end
response = @client.report(*transactions)
assert response.success?
end