diff --git a/spec/octokit/client/stats_spec.rb b/spec/octokit/client/stats_spec.rb index 99fb4b5c2..b8bb934b5 100644 --- a/spec/octokit/client/stats_spec.rb +++ b/spec/octokit/client/stats_spec.rb @@ -15,6 +15,7 @@ { :status => 202 }, # Cold request { :status => 202 }, # Cold request { :status => 204, :body => [].to_json }, # Warm request + { :status => 204, :body => [].to_json } # Warm request ) end @@ -28,7 +29,10 @@ it "returns [] when GitHub returns 204" do stats = @client.contributors_stats("octokit/octokit.rb", :retry_timeout => 3) expect(stats).to eq([]) + end + it "doesn't retry when GitHub returns 204" do + stats = @client.contributors_stats("octokit/octokit.rb", :retry_timeout => 4) assert_requested :get, github_url("/repos/octokit/octokit.rb/stats/contributors"), :times => 3 end