Skip to content

Commit

Permalink
Merge pull request #2669 from alphagov/add-links-to-visualise-smart-a…
Browse files Browse the repository at this point in the history
…nswers

Add links to visualise Smart Answers to index
  • Loading branch information
chrisroos authored Jul 28, 2016
2 parents da7ee66 + 6d30f9a commit 47d23cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/views/smart_answers/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

<ul>
<% @flows.each do |flow| %>
<li><%= link_to flow.name, smart_answer_path(flow.name) %></li>
<li>
<%= link_to flow.name, smart_answer_path(flow.name) %>
(<%= link_to 'visualise', visualise_path(flow.name) %>)
</li>
<% end %>
</ul>
6 changes: 6 additions & 0 deletions test/functional/smart_answers_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ def teardown
assert_select "ul li a[href='/flow-a']", text: "flow-a"
assert_select "ul li a[href='/flow-b']", text: "flow-b"
end

should "render links to visualise flows" do
get :index
assert_select "ul li a[href='/flow-a/visualise']", text: "visualise"
assert_select "ul li a[href='/flow-b/visualise']", text: "visualise"
end
end

context "GET /<slug>" do
Expand Down

0 comments on commit 47d23cf

Please sign in to comment.