Sha256: 7423f01ee4aca1417f6180480e6ebf625ca36eb1422746572d6d0491137e5e12

Contents?: true

Size: 740 Bytes

Versions: 22

Compression:

Stored size: 740 Bytes

Contents

require 'spec_helper'

describe Sufia::Zotero do
  it { is_expected.to respond_to(:config) }

  describe 'configuration' do
    subject { described_class.reload_config! }

    let(:client_key) { 'abc123' }
    let(:client_secret) { '789xyz' }

    before do
      stub_const('ENV',           'ZOTERO_CLIENT_KEY' => client_key,
                                  'ZOTERO_CLIENT_SECRET' => client_secret)
    end

    # Reload the config so other tests don't see the stub_const values
    after(:context) { described_class.reload_config! }

    it 'has a client key' do
      expect(subject['client_key']).to eq(client_key)
    end

    it 'has a client secret' do
      expect(subject['client_secret']).to eq(client_secret)
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
sufia-7.4.1 spec/lib/sufia/zotero/config_spec.rb
sufia-7.4.0 spec/lib/sufia/zotero/config_spec.rb
sufia-7.3.1 spec/lib/sufia/zotero/config_spec.rb
sufia-7.3.0 spec/lib/sufia/zotero/config_spec.rb
sufia-7.3.0.rc3 spec/lib/sufia/zotero/config_spec.rb
sufia-7.3.0.rc2 spec/lib/sufia/zotero/config_spec.rb
sufia-7.3.0.rc1 spec/lib/sufia/zotero/config_spec.rb
sufia-7.2.0 spec/lib/sufia/zotero/config_spec.rb
sufia-6.7.0 spec/lib/sufia/zotero/config_spec.rb
sufia-7.1.0 spec/lib/sufia/zotero/config_spec.rb
sufia-7.0.0 spec/lib/sufia/zotero/config_spec.rb
sufia-7.0.0.rc2 spec/lib/sufia/zotero/config_spec.rb
sufia-7.0.0.rc1 spec/lib/sufia/zotero/config_spec.rb
sufia-7.0.0.beta4 spec/lib/sufia/zotero/config_spec.rb
sufia-7.0.0.beta3 spec/lib/sufia/zotero/config_spec.rb
sufia-7.0.0.beta2 spec/lib/sufia/zotero/config_spec.rb
sufia-7.0.0.beta1 spec/lib/sufia/zotero/config_spec.rb
sufia-6.6.1 spec/lib/sufia/zotero/config_spec.rb
sufia-6.6.0 spec/lib/sufia/zotero/config_spec.rb
sufia-6.5.0 spec/lib/sufia/zotero/config_spec.rb