Sha256: a331ec090ec9fa91ba880534650bcaf58d5be1c0660158f0fe8496848bc4e164

Contents?: true

Size: 1.1 KB

Versions: 4

Compression:

Stored size: 1.1 KB

Contents

require 'spec_helper'
require 'ezlinkedin'

describe EzLinkedin do
	before(:each) do
    EzLinkedin.token = nil
    EzLinkedin.secret = nil
    EzLinkedin.default_profile_fields = nil
  end

  it "should be able to set the consumer token and consumer secret" do
    EzLinkedin.token  = 'consumer_token'
    EzLinkedin.secret = 'consumer_secret'

    EzLinkedin.token.should  == 'consumer_token'
    EzLinkedin.secret.should == 'consumer_secret'
  end

  it "should be able to set the default profile fields" do
    EzLinkedin.default_profile_fields = ['education', 'positions']

    EzLinkedin.default_profile_fields.should == ['education', 'positions']
  end

  it "should be able to set the consumer token and consumer secret via a configure block" do
    EzLinkedin.configure do |config|
      config.token  = 'consumer_token'
      config.secret = 'consumer_secret'
      config.default_profile_fields = ['education', 'positions']
    end

    EzLinkedin.token.should  == 'consumer_token'
    EzLinkedin.secret.should == 'consumer_secret'
    EzLinkedin.default_profile_fields.should == ['education', 'positions']
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ezlinkedin-0.5.3 spec/ezlinkedin_spec.rb
ezlinkedin-0.5.2 spec/ezlinkedin_spec.rb
ezlinkedin-0.4.2 spec/ezlinkedin_spec.rb
ezlinkedin-0.2.2 spec/ezlinkedin_spec.rb