diff --git a/lib/onebox/engine/github_issue_onebox.rb b/lib/onebox/engine/github_issue_onebox.rb index 26eb731fba9..5a8b0c48b43 100644 --- a/lib/onebox/engine/github_issue_onebox.rb +++ b/lib/onebox/engine/github_issue_onebox.rb @@ -70,8 +70,6 @@ module Onebox } end - private - def load_repo load_json("https://api.github.com/repos/#{match[:org]}/#{match[:repo]}") end diff --git a/spec/lib/onebox/engine/github_repo_onebox_spec.rb b/spec/lib/onebox/engine/github_repo_onebox_spec.rb index 7673110eb76..a3f89ab0f94 100644 --- a/spec/lib/onebox/engine/github_repo_onebox_spec.rb +++ b/spec/lib/onebox/engine/github_repo_onebox_spec.rb @@ -46,9 +46,9 @@ RSpec.describe Onebox::Engine::GithubRepoOnebox do context "when the repo has no description" do let(:response) do - resp = onebox_response(described_class.onebox_name) + resp = MultiJson.load(onebox_response(described_class.onebox_name)) resp["description"] = "" - resp + MultiJson.dump(resp) end it "includes a message about contributing to the repo" do