Sha256: 16c151a78ecceaa26faf0bc4feb86b38689261c193b2207c17529497c88b5702

Contents?: true

Size: 671 Bytes

Versions: 6

Compression:

Stored size: 671 Bytes

Contents

require 'spec_helper'

describe Sufia::Analytics do
  before do
    token = OAuth2::AccessToken.new(nil, nil)
    allow(subject).to receive(:token).and_return(token)
  end

  it 'responds to :config' do
    expect(subject).to respond_to(:config)
  end

  it 'reads its config from a yaml file' do
    expect(subject.config.keys.sort).to eql ['app_name', 'app_version', 'client_email', 'privkey_path', 'privkey_secret']
  end

  it 'responds to :user' do
    expect(subject).to respond_to(:user)
  end

  it 'instantiates a user' do
    expect(subject.user).to be_a(Legato::User)
  end

  it 'responds to :profile' do
    expect(subject).to respond_to(:profile)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sufia-6.7.0 spec/lib/sufia/analytics_spec.rb
sufia-6.6.1 spec/lib/sufia/analytics_spec.rb
sufia-6.6.0 spec/lib/sufia/analytics_spec.rb
sufia-6.5.0 spec/lib/sufia/analytics_spec.rb
sufia-6.4.0 spec/lib/sufia/analytics_spec.rb
sufia-6.3.0 spec/lib/sufia/analytics_spec.rb