spec/auth_spec.rb in yandex-money-sdk-0.9.5 vs spec/auth_spec.rb in yandex-money-sdk-0.10.0
- old
+ new
@@ -52,6 +52,11 @@
token_api.obtain_token
api = YandexMoney::Api.new(token: token_api.token)
expect(api.account_info.account).to eq("41001565326286")
end
end
+
+ it "should raise exception while trying to obtain token without code" do
+ api = YandexMoney::Api.new(client_id: CLIENT_ID)
+ expect { api.obtain_token }.to raise_error YandexMoney::FieldNotSetError
+ end
end