mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2024-12-22 15:43:14 +01:00
Add feature spec for search result item
This commit is contained in:
parent
25ceb50141
commit
5b29fe761c
1 changed files with 10 additions and 0 deletions
|
@ -25,4 +25,14 @@ RSpec.feature "Basic search", type: :feature, elasticsearch: true do
|
|||
expect(page).to have_content("#{@papers.size} Dokumente in der Datenbank")
|
||||
end
|
||||
|
||||
scenario "Search results have basic information" do
|
||||
visit search_path body: "leipzig"
|
||||
paper = @papers.first
|
||||
result = page.find("li.search-result", match: :first)
|
||||
expect(result).to have_link(paper.name, href: paper.url)
|
||||
expect(result).to have_css("span.paper_type", text: paper.paper_type)
|
||||
expect(result).to have_css("span.originator", text: paper.originator)
|
||||
expect(result).to have_css("span.published", text: I18n.l(paper.published_at.to_date))
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue