Sha256: f8b539f811453350ed55192aac0a4312cd012e35ccce0f937d1a1d736bfeb8cf
Contents?: true
Size: 1.22 KB
Versions: 5
Compression:
Stored size: 1.22 KB
Contents
require 'spec_helper' describe Flinks::API::Refresh do let(:api_endpoint) { Flinks::Client.dry_initializer.definitions[:api_endpoint].default.call } let(:client) { Flinks.new(customer_id: 'customer_id') } let(:login_id) { 'login_id' } describe '#activate_scheduled_refresh' do before do stub_request(:patch, /#{api_endpoint}/) .to_return(status: 200, body: "{}", headers: { 'Content-Type'=>'application/json' }) end it "returns an object" do expect(client.activate_scheduled_refresh(login_id: login_id)).to be_a(Hash) end end describe '#deactivate_scheduled_refresh' do before do stub_request(:patch, /#{api_endpoint}/) .to_return(status: 200, body: "{}", headers: { 'Content-Type'=>'application/json' }) end it "returns an object" do expect(client.deactivate_scheduled_refresh(login_id: login_id)).to be_a(Hash) end end describe '#set_scheduled_refresh' do before do stub_request(:patch, /#{api_endpoint}/) .to_return(status: 200, body: "{}", headers: { 'Content-Type'=>'application/json' }) end it "returns an object" do expect(client.set_scheduled_refresh(true, login_id: login_id)).to be_a(Hash) end end end
Version data entries
5 entries across 5 versions & 1 rubygems