Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mo-nathan committed Dec 21, 2024
1 parent 9f3bf82 commit 7d65a2e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/views/controllers/projects/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ add_project_banner(@project)
<br />

<%= panel_block(id: "project_summary") do %>
<%= tag.p(@project.summary.tpl) %>
<%= tag.p(@project.summary.to_s.html_safe.tpl) %>

<% if @project.species_lists.any? %>
<p><b><%= :SPECIES_LISTS.t %>:</b>
Expand Down
4 changes: 0 additions & 4 deletions test/controllers/checklists_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ def test_checklist_for_project
{ project_id: project.id } } }).distinct

get(:show, params: { project_id: project.id })
assert_match(/Checklist for #{project.title}/, css_select("title").text,
"Wrong page")
assert_match(/\(1\)/, @response.body)

prove_checklist_content(expect)
Expand All @@ -70,8 +68,6 @@ def test_checklist_for_project_location
project: project.title,
location: location.display_name
)
assert_match(/#{title}/, css_select("title").text,
"Wrong page")
assert_match(/\(1\)/, @response.body)
assert_match("location%3A#{location.id}", @response.body)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ def test_index_project
get(:index, params: { project: project.id })

assert_response(:success)
assert_displayed_title("Observations for #{project.title}")
assert_displayed_title(project.title)
end

def test_index_project_without_observations
Expand All @@ -572,7 +572,7 @@ def test_index_project_without_observations
get(:index, params: { project: project.id })

assert_response(:success)
assert_displayed_title("")
assert_displayed_title(project.title)
assert_flash_text(:runtime_no_matches.l(type: :observation))
end

Expand Down

0 comments on commit 7d65a2e

Please sign in to comment.