spec/lib/oauth/client/credentials_spec.rb in doorkeeper-sequel-1.5.0 vs spec/lib/oauth/client/credentials_spec.rb in doorkeeper-sequel-2.0.0

- old
+ new

@@ -1,8 +1,6 @@ require 'spec_helper' -require 'active_support/core_ext/string' -require 'doorkeeper/oauth/client' class Doorkeeper::OAuth::Client describe Credentials do let(:client_id) { 'some-uid' } let(:client_secret) { 'some-secret' } @@ -16,11 +14,11 @@ describe :from_request do let(:request) { double.as_null_object } let(:method) do - ->(_request) { return 'uid', 'secret' } + ->(_request) { %w[uid secret] } end it 'accepts anything that responds to #call' do expect(method).to receive(:call).with(request) Credentials.from_request request, method @@ -77,10 +75,10 @@ expect(uid).to eq('some-uid') expect(secret).to eq('some-secret') end it 'is blank if Authorization is not Basic' do - request = double authorization: "#{credentials}" + request = double authorization: credentials.to_s uid, secret = Credentials.from_basic(request) expect(uid).to be_blank expect(secret).to be_blank end