spec/cases/oauth_spec.rb in koala-2.4.0 vs spec/cases/oauth_spec.rb in koala-2.5.0rc1
- old
+ new
@@ -399,11 +399,11 @@
"machine_id" => "bar"
}
allow(Koala).to receive(:make_request).and_return(
Koala::HTTPService::Response.new(
200,
- MultiJson.dump(result),
+ JSON.dump(result),
{}
)
)
expect(@oauth.get_access_token_info(@code)).to eq(result)
end
@@ -582,10 +582,10 @@
describe "for parsing signed requests" do
# the signed request code is ported directly from Facebook
# so we only need to test at a high level that it works
it "throws an error if the algorithm is unsupported" do
- allow(MultiJson).to receive(:load).and_return("algorithm" => "my fun algorithm")
+ allow(JSON).to receive(:load).and_return("algorithm" => "my fun algorithm")
expect { @oauth.parse_signed_request(@signed_params) }.to raise_error(Koala::Facebook::OAuthSignatureError)
end
it "throws an error if the signature is invalid" do
allow(OpenSSL::HMAC).to receive(:hexdigest).and_return("i'm an invalid signature")