Sha256: c9d6a77dfa8f83514f72b293dac1c54def0dd507b03ea086b44a7f98f1d65b5e

Contents?: true

Size: 575 Bytes

Versions: 4

Compression:

Stored size: 575 Bytes

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 '#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

4 entries across 4 versions & 1 rubygems

Version Path
flinks-0.5.2 spec/lib/api/refresh_spec.rb
flinks-0.5.1 spec/lib/api/refresh_spec.rb
flinks-0.5.0 spec/lib/api/refresh_spec.rb
flinks-0.4.2 spec/lib/api/refresh_spec.rb