Sha256: 714b4b192445b8e274a662b08d12dbb215a935c081b8a43a34ff142d716597ce

Contents?: true

Size: 615 Bytes

Versions: 5

Compression:

Stored size: 615 Bytes

Contents

require 'spec_helper'

describe Flinks::Client do

  describe "#initialize" do
    it "without required arguments" do
      expect { Flinks::Client.new }.to raise_error KeyError
    end

    it "with required arguments" do
      client = Flinks::Client.new(customer_id: 'token')
      expect(client.customer_id).to eq('token')
    end

    it "sets defaults" do
      client = Flinks::Client.new(customer_id: 'token')
      expect(client.api_endpoint).not_to be_nil
      expect(client.user_agent).not_to be_nil
      expect(client.on_error).not_to be_nil
      expect(client.debug).not_to be_nil
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
flinks-0.3.1 spec/lib/client_spec.rb
flinks-0.3.0 spec/lib/client_spec.rb
flinks-0.2.0 spec/lib/client_spec.rb
flinks-0.1.1 spec/lib/client_spec.rb
flinks-0.1.0 spec/lib/client_spec.rb