Sha256: fc6831d74ea39c6d99eb028f0e22299079a386db9f87d3a3a5ea5f3a937e319a

Contents?: true

Size: 648 Bytes

Versions: 1

Compression:

Stored size: 648 Bytes

Contents

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

1 entries across 1 versions & 1 rubygems

Version Path
sufia-7.0.0.beta1 spec/lib/sufia/analytics_spec.rb