Sha256: 608d62cdcc3b4a69dba0db298943994feb8f401628fdd650125a0235529d6ea7

Contents?: true

Size: 833 Bytes

Versions: 2

Compression:

Stored size: 833 Bytes

Contents

require 'spec_helper'

describe Locomotive::Coal::Client do

  before { VCR.insert_cassette 'client', record: :new_episodes }
  after  { VCR.eject_cassette }

  let(:uri)         { 'http://sample.lvh.me:4000/locomotive/api' }
  let(:credentials) { { email: 'john@doe.net', password: 'easyone' } }
  let(:client)      { described_class.new(uri, credentials) }

  describe '#my_token' do
    subject { client.token }
    it { is_expected.not_to eq nil }
  end

  describe '#my_account' do
    subject { client.my_account.get.name }
    it { is_expected.not_to eq nil }
  end

  describe '#sites' do
    subject { client.sites.all.first }
    it { is_expected.not_to eq nil }
  end

  describe '#scope_by' do
    let(:site) { client.sites.all.first }
    subject { client.scope_by(site) }
    it { is_expected.to eq client }
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
locomotivecms_coal-1.0.0.pre.alpha.1 spec/integration/client_spec.rb
locomotivecms_coal-1.0.0.pre.alpha spec/integration/client_spec.rb