Skip to content

Commit

Permalink
Add basic tests for browse#new_note and browse#query
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Jan 9, 2019
1 parent 5c877e0 commit 6263764
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/controllers/browse_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ def test_routes
{ :path => "/note/new", :method => :get },
{ :controller => "browse", :action => "new_note" }
)
assert_routing(
{ :path => "/query", :method => :get },
{ :controller => "browse", :action => "query" }
)
end

def test_read_relation
Expand Down Expand Up @@ -220,6 +224,18 @@ def test_redacted_relation_history
assert_select ".browse-section.browse-relation", 2
end

def test_new_note
get :new_note
assert_response :success
assert_template "browse/new_note"
end

def test_query
get :query
assert_response :success
assert_template "browse/query"
end

private

# This is a convenience method for most of the above checks
Expand Down

0 comments on commit 6263764

Please sign in to comment.