Sha256: e5647db7db45c7aa6dede4d0b2be86bd31f529c2f77355b78f53e3b856b1f81a

Contents?: true

Size: 812 Bytes

Versions: 9

Compression:

Stored size: 812 Bytes

Contents

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

9 entries across 9 versions & 1 rubygems

Version Path
blacklight-spotlight-2.4.1 spec/features/translation_scope_spec.rb
blacklight-spotlight-2.4.0 spec/features/translation_scope_spec.rb
blacklight-spotlight-2.3.3 spec/features/translation_scope_spec.rb
blacklight-spotlight-2.3.2 spec/features/translation_scope_spec.rb
blacklight-spotlight-2.3.1 spec/features/translation_scope_spec.rb
blacklight-spotlight-2.3.0 spec/features/translation_scope_spec.rb
blacklight-spotlight-2.2.1 spec/features/translation_scope_spec.rb
blacklight-spotlight-2.2.0 spec/features/translation_scope_spec.rb
blacklight-spotlight-2.1.0 spec/features/translation_scope_spec.rb