Sha256: c5569c9f49ebcae1141e76d6cccb268113cbadada57f5099001f6f6feb658b0b

Contents?: true

Size: 1005 Bytes

Versions: 3

Compression:

Stored size: 1005 Bytes

Contents

require "spec_helper"

describe Corkboard::Providers::Instagram do
  let(:provider) { Corkboard::Providers::Instagram }
  let(:instance) { provider.new(credentials) }
  let(:credentials) do
    OpenStruct.new(:args => [{
      :client_key    => 'EXAMPLE',
      :client_secret => 'EXAMPLE'
    }])
  end

  describe ".service" do
    it "is derived from the Class" do
      expect(provider.service).to eq(:instagram)
    end
  end

  describe ".setup" do
    context "given Instagram credentials" do
      it "configures Instagram" do
        Instagram.should_receive(:configure)
        provider.setup(credentials)
      end

      it "returns settings" do
        expect(provider.setup(credentials))
          .to eq(['EXAMPLE', 'EXAMPLE', { :scope => 'relationships' }])
      end
    end
  end

  describe ".client" do
    it "is pending" do
      pending
    end
  end

  describe "#service" do
    it "is derived from the Class" do
      expect(instance.service).to eq(:instagram)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
corkboard-0.1.3 spec/corkboard/providers/instagram_spec.rb
corkboard-0.1.2 spec/corkboard/providers/instagram_spec.rb
corkboard-0.1.1 spec/corkboard/providers/instagram_spec.rb