Sha256: ca1ec52535d1a2e045839a1b47d551f700e21a2e547c1c21d76ee4b6d9a9406b

Contents?: true

Size: 843 Bytes

Versions: 40

Compression:

Stored size: 843 Bytes

Contents

# frozen_string_literal: true

describe 'Translations scope setting', type: :feature do
  let(:exhibit) { FactoryBot.create(:exhibit) }
  let(:other_exhibit) { FactoryBot.create(:exhibit) }
  let(:exhibit_curator) { FactoryBot.create(:exhibit_curator, exhibit: exhibit) }

  describe 'exhibit route set' do
    before do
      login_as exhibit_curator
      FactoryBot.create(:translation, exhibit: exhibit)
      FactoryBot.create(:translation, exhibit: other_exhibit)
    end

    it 'default scope of Translation should be limited to current exhibit' do
      visit spotlight.exhibit_path(exhibit)
      expect(Translation.all.count).to eq 1
    end
  end

  describe 'without the context of an exhibit' do
    it 'renders page ok' do
      visit root_path
      expect(page).to have_css '.site-title', text: 'Blacklight'
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
blacklight-spotlight-3.4.0 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.3.0 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.2.0 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.1.0 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.0.3 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.0.2 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.0.1 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.0.0 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.0.0.rc6 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.0.0.rc5 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.0.0.rc4 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.0.0.rc3 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.0.0.rc2 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.0.0.rc1 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.0.0.alpha.10 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.0.0.alpha.9 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.0.0.alpha.8 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.0.0.alpha.7 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.0.0.alpha.6 spec/features/translation_scope_spec.rb
blacklight-spotlight-3.0.0.alpha.5 spec/features/translation_scope_spec.rb