Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ GEM
csv (3.3.5)
drb (2.2.3)
erubi (1.13.1)
ffi (1.17.2-aarch64-linux-gnu)
ffi (1.17.2-aarch64-linux-musl)
ffi (1.17.2-arm64-darwin)
ffi (1.17.2-x86_64-darwin)
ffi (1.17.2-x86_64-linux-gnu)
ffi (1.17.2-x86_64-linux-musl)
ffi (1.17.4-aarch64-linux-gnu)
ffi (1.17.4-aarch64-linux-musl)
ffi (1.17.4-arm64-darwin)
ffi (1.17.4-x86_64-darwin)
ffi (1.17.4-x86_64-linux-gnu)
ffi (1.17.4-x86_64-linux-musl)
fiber-annotation (0.2.0)
fiber-local (1.1.0)
fiber-storage
Expand All @@ -79,7 +79,7 @@ GEM
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.7.0)
metrics (0.15.0)
minitest (5.26.0)
minitest (5.27.0)
minitest-focus (1.4.0)
minitest (>= 4, < 6)
minitest-hooks (1.5.2)
Expand Down Expand Up @@ -181,7 +181,7 @@ GEM
concurrent-ruby (~> 1.0)
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.1.0)
unicode-emoji (4.2.0)
uri (1.1.0)
webmock (3.26.1)
addressable (>= 2.8.0)
Expand Down
30 changes: 15 additions & 15 deletions test/tilda_ruby/client_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def after_all
end

def test_client_default_request_default_retry_attempts
stub_request(:get, "http://localhost/v1/getprojectslist?publickey,secretkey").to_return_json(
stub_request(:get, "http://localhost/v1/getprojectslist?publickey=My%20Publickey&secretkey=My%20Secretkey").to_return_json(
status: 500,
body: {}
)
Expand All @@ -48,7 +48,7 @@ def test_client_default_request_default_retry_attempts
end

def test_client_given_request_default_retry_attempts
stub_request(:get, "http://localhost/v1/getprojectslist?publickey,secretkey").to_return_json(
stub_request(:get, "http://localhost/v1/getprojectslist?publickey=My%20Publickey&secretkey=My%20Secretkey").to_return_json(
status: 500,
body: {}
)
Expand All @@ -69,7 +69,7 @@ def test_client_given_request_default_retry_attempts
end

def test_client_default_request_given_retry_attempts
stub_request(:get, "http://localhost/v1/getprojectslist?publickey,secretkey").to_return_json(
stub_request(:get, "http://localhost/v1/getprojectslist?publickey=My%20Publickey&secretkey=My%20Secretkey").to_return_json(
status: 500,
body: {}
)
Expand All @@ -89,7 +89,7 @@ def test_client_default_request_given_retry_attempts
end

def test_client_given_request_given_retry_attempts
stub_request(:get, "http://localhost/v1/getprojectslist?publickey,secretkey").to_return_json(
stub_request(:get, "http://localhost/v1/getprojectslist?publickey=My%20Publickey&secretkey=My%20Secretkey").to_return_json(
status: 500,
body: {}
)
Expand All @@ -110,7 +110,7 @@ def test_client_given_request_given_retry_attempts
end

def test_client_retry_after_seconds
stub_request(:get, "http://localhost/v1/getprojectslist?publickey,secretkey").to_return_json(
stub_request(:get, "http://localhost/v1/getprojectslist?publickey=My%20Publickey&secretkey=My%20Secretkey").to_return_json(
status: 500,
headers: {"retry-after" => "1.3"},
body: {}
Expand All @@ -135,7 +135,7 @@ def test_client_retry_after_seconds
def test_client_retry_after_date
time_now = Time.now

stub_request(:get, "http://localhost/v1/getprojectslist?publickey,secretkey").to_return_json(
stub_request(:get, "http://localhost/v1/getprojectslist?publickey=My%20Publickey&secretkey=My%20Secretkey").to_return_json(
status: 500,
headers: {"retry-after" => (time_now + 10).httpdate},
body: {}
Expand All @@ -160,7 +160,7 @@ def test_client_retry_after_date
end

def test_client_retry_after_ms
stub_request(:get, "http://localhost/v1/getprojectslist?publickey,secretkey").to_return_json(
stub_request(:get, "http://localhost/v1/getprojectslist?publickey=My%20Publickey&secretkey=My%20Secretkey").to_return_json(
status: 500,
headers: {"retry-after-ms" => "1300"},
body: {}
Expand All @@ -183,7 +183,7 @@ def test_client_retry_after_ms
end

def test_retry_count_header
stub_request(:get, "http://localhost/v1/getprojectslist?publickey,secretkey").to_return_json(
stub_request(:get, "http://localhost/v1/getprojectslist?publickey=My%20Publickey&secretkey=My%20Secretkey").to_return_json(
status: 500,
body: {}
)
Expand All @@ -205,7 +205,7 @@ def test_retry_count_header
end

def test_omit_retry_count_header
stub_request(:get, "http://localhost/v1/getprojectslist?publickey,secretkey").to_return_json(
stub_request(:get, "http://localhost/v1/getprojectslist?publickey=My%20Publickey&secretkey=My%20Secretkey").to_return_json(
status: 500,
body: {}
)
Expand All @@ -227,7 +227,7 @@ def test_omit_retry_count_header
end

def test_overwrite_retry_count_header
stub_request(:get, "http://localhost/v1/getprojectslist?publickey,secretkey").to_return_json(
stub_request(:get, "http://localhost/v1/getprojectslist?publickey=My%20Publickey&secretkey=My%20Secretkey").to_return_json(
status: 500,
body: {}
)
Expand All @@ -247,7 +247,7 @@ def test_overwrite_retry_count_header
end

def test_client_redirect_307
stub_request(:get, "http://localhost/v1/getprojectslist?publickey,secretkey").to_return_json(
stub_request(:get, "http://localhost/v1/getprojectslist?publickey=My%20Publickey&secretkey=My%20Secretkey").to_return_json(
status: 307,
headers: {"location" => "/redirected"},
body: {}
Expand Down Expand Up @@ -281,7 +281,7 @@ def test_client_redirect_307
end

def test_client_redirect_303
stub_request(:get, "http://localhost/v1/getprojectslist?publickey,secretkey").to_return_json(
stub_request(:get, "http://localhost/v1/getprojectslist?publickey=My%20Publickey&secretkey=My%20Secretkey").to_return_json(
status: 303,
headers: {"location" => "/redirected"},
body: {}
Expand Down Expand Up @@ -310,7 +310,7 @@ def test_client_redirect_303
end

def test_client_redirect_auth_keep_same_origin
stub_request(:get, "http://localhost/v1/getprojectslist?publickey,secretkey").to_return_json(
stub_request(:get, "http://localhost/v1/getprojectslist?publickey=My%20Publickey&secretkey=My%20Secretkey").to_return_json(
status: 307,
headers: {"location" => "/redirected"},
body: {}
Expand Down Expand Up @@ -342,7 +342,7 @@ def test_client_redirect_auth_keep_same_origin
end

def test_client_redirect_auth_strip_cross_origin
stub_request(:get, "http://localhost/v1/getprojectslist?publickey,secretkey").to_return_json(
stub_request(:get, "http://localhost/v1/getprojectslist?publickey=My%20Publickey&secretkey=My%20Secretkey").to_return_json(
status: 307,
headers: {"location" => "https://example.com/redirected"},
body: {}
Expand Down Expand Up @@ -370,7 +370,7 @@ def test_client_redirect_auth_strip_cross_origin
end

def test_default_headers
stub_request(:get, "http://localhost/v1/getprojectslist?publickey,secretkey").to_return_json(
stub_request(:get, "http://localhost/v1/getprojectslist?publickey=My%20Publickey&secretkey=My%20Secretkey").to_return_json(
status: 200,
body: {}
)
Expand Down