From a98e759dfbc9808e36ad5b457747d62a5f24b82b Mon Sep 17 00:00:00 2001 From: Emmanuel Chigbo Date: Thu, 9 Jun 2016 20:57:47 +0100 Subject: [PATCH] Modify the test to suit the modification in the code implementation --- spec/lib/zi_notification/connection_spec.rb | 4 ++-- spec/services/token_manager_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/lib/zi_notification/connection_spec.rb b/spec/lib/zi_notification/connection_spec.rb index d3328fd..ed67a78 100644 --- a/spec/lib/zi_notification/connection_spec.rb +++ b/spec/lib/zi_notification/connection_spec.rb @@ -3,8 +3,8 @@ RSpec.describe ZiNotification::Connection do # NOTE If/when we want to switch adapter from Faraday, we only need to overide interfacing methods here describe ".connection" do - subject { described_class.connection } - + subject { described_class.connection('some.token') } + it { should be_an_instance_of Faraday::Connection } end diff --git a/spec/services/token_manager_spec.rb b/spec/services/token_manager_spec.rb index 832aaa8..035b5a9 100644 --- a/spec/services/token_manager_spec.rb +++ b/spec/services/token_manager_spec.rb @@ -51,7 +51,7 @@ it 'sets the notification object' do decoded = subject.decode(token) - expect(decoded.first['object']).to eql object + expect(decoded.first['payload']).to eql object end end end