diff options
Diffstat (limited to 'spec/lib/bitbucket/connection_spec.rb')
-rw-r--r-- | spec/lib/bitbucket/connection_spec.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/lib/bitbucket/connection_spec.rb b/spec/lib/bitbucket/connection_spec.rb index 14faeb231a9..c547a80485d 100644 --- a/spec/lib/bitbucket/connection_spec.rb +++ b/spec/lib/bitbucket/connection_spec.rb @@ -1,30 +1,30 @@ -require 'spec_helper' +require "spec_helper" describe Bitbucket::Connection do before do - allow_any_instance_of(described_class).to receive(:provider).and_return(double(app_id: '', app_secret: '')) + allow_any_instance_of(described_class).to receive(:provider).and_return(double(app_id: "", app_secret: "")) end - describe '#get' do - it 'calls OAuth2::AccessToken::get' do + describe "#get" do + it "calls OAuth2::AccessToken::get" do expect_any_instance_of(OAuth2::AccessToken).to receive(:get).and_return(double(parsed: true)) connection = described_class.new({}) - connection.get('/users') + connection.get("/users") end end - describe '#expired?' do - it 'calls connection.expired?' do + describe "#expired?" do + it "calls connection.expired?" do expect_any_instance_of(OAuth2::AccessToken).to receive(:expired?).and_return(true) expect(described_class.new({}).expired?).to be_truthy end end - describe '#refresh!' do - it 'calls connection.refresh!' do + describe "#refresh!" do + it "calls connection.refresh!" do response = double(token: nil, expires_at: nil, expires_in: nil, refresh_token: nil) expect_any_instance_of(OAuth2::AccessToken).to receive(:refresh!).and_return(response) |