Sha256: 33fe8fe6d8c2cd7def5f80822b14c252b9f5f442f8aba782cd34dd8f946586ed
Contents?: true
Size: 818 Bytes
Versions: 7
Compression:
Stored size: 818 Bytes
Contents
require 'spec_helper' describe 'users/_user_info.html.erb', type: :view do let(:user) { stub_model(User, user_key: 'jdoe42') } context 'with Zotero disabled' do before do allow(Sufia.config).to receive(:arkivo_api) { false } allow(user).to receive(:zotero_userid).and_raise(NoMethodError) render "users/user_info", user: user end it 'does not display a Zotero profile link' do expect(rendered).not_to match(/Zotero Profile/) end end context 'with Zotero enabled' do before do allow(Sufia.config).to receive(:arkivo_api) { true } allow(user).to receive(:zotero_userid) { 'jdoe42zotero' } render "users/user_info", user: user end it 'displays a Zotero profile link' do expect(rendered).to match(/Zotero Profile/) end end end
Version data entries
7 entries across 7 versions & 1 rubygems