Sha256: 5e62ee2cacce6a4d74667d8e9d535e115ab90fb36ad35fb3418036fc51f0b10a

Contents?: true

Size: 738 Bytes

Versions: 38

Compression:

Stored size: 738 Bytes

Contents

require 'spec_helper'

RSpec.describe Ey::Core::Client do
  let!(:client)   { create_client }
  let!(:account)  { create_account }
  let!(:user)     { create_user }

  context "with a request" do
    let!(:request) { account.providers.create!(type: "aws") }

    it "should list unfinished requests" do
      expect(client.requests.all(finished_at: nil)).to contain_exactly(request)
    end

    it "request should finish after polling a number of times == Mock.delay" do
      Ey::Core::Client::Mock.delay = 3
      expect(client.requests.get(request.id).finished_at).to be_nil
      expect(client.requests.get(request.id).finished_at).to be_nil
      expect(client.requests.get(request.id).finished_at).to_not be_nil
    end
  end
end

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
ey-core-3.6.4 spec/requests_spec.rb
ey-core-3.6.3 spec/requests_spec.rb
ey-core-3.6.1 spec/requests_spec.rb
groove-ey-core-3.6.3 spec/requests_spec.rb
groove-ey-core-3.6.2 spec/requests_spec.rb
groove-ey-core-3.6.1 spec/requests_spec.rb
ey-core-3.5.0 spec/requests_spec.rb
ey-core-3.4.4 spec/requests_spec.rb
ey-core-3.4.2 spec/requests_spec.rb
ey-core-3.4.1 spec/requests_spec.rb
ey-core-3.4.0 spec/requests_spec.rb
ey-core-3.3.1 spec/requests_spec.rb
ey-core-3.3.0 spec/requests_spec.rb
ey-core-3.2.6 spec/requests_spec.rb
ey-core-3.2.5 spec/requests_spec.rb
ey-core-3.2.4 spec/requests_spec.rb
ey-core-3.2.3 spec/requests_spec.rb
ey-core-3.2.2 spec/requests_spec.rb
ey-core-3.2.1 spec/requests_spec.rb
ey-core-3.2.0 spec/requests_spec.rb