spec/adyen-admin/client_spec.rb in adyen-admin-0.0.11 vs spec/adyen-admin/client_spec.rb in adyen-admin-0.0.12
- old
+ new
@@ -29,11 +29,13 @@
Adyen::Admin.get(Adyen::Admin::Skin::SKINS)
end.to raise_error Adyen::Admin::AuthenticationError
end
it 'sets authenticated to false on error' do
+ Adyen::Admin.instance_variable_set(:@authenticated, true)
+
expect do
Adyen::Admin.get(Adyen::Admin::Skin::SKINS) rescue nil
- end.to change { Adyen::Admin.authenticated? }.from(nil).to(false)
+ end.to change { Adyen::Admin.authenticated? }.from(true).to(false)
end
end
end