Skip to content

Commit

Permalink
Merge pull request #2347 from projecthydra/feature_test
Browse files Browse the repository at this point in the history
Feature test to check that blacklight renders fields correctly
  • Loading branch information
mjgiarlo authored Aug 11, 2016
2 parents ad66816 + c6293e9 commit 19ea914
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions spec/features/search_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
describe 'searching' do
let(:user) { create :user }
let(:subject_value) { 'fffzzz' }
let(:subject_value) { 'mustache' }
let!(:work) do
create(:public_work, title: ["Toothbrush"], keyword: [subject_value], user: user)
create(:public_work,
title: ["Toothbrush"],
keyword: [subject_value, 'taco'],
user: user)
end

let!(:collection) do
Expand Down Expand Up @@ -44,6 +47,8 @@
expect(page).to have_content "Toothbrush"
expect(page).to have_content('collection title abc')
expect(page).to have_css("span.collection-icon-search")

expect(page.body).to include "<span itemprop=\"keywords\"><a href=\"/catalog?f%5Bkeyword_sim%5D%5B%5D=taco\">taco</a></span> and <span itemprop=\"keywords\"><a href=\"/catalog?f%5Bkeyword_sim%5D%5B%5D=mustache\">mustache</a></span>"
end

it "does not display search options for dashboard files" do
Expand Down

0 comments on commit 19ea914

Please sign in to comment.