diff --git a/test/controllers/notes_controller_test.rb b/test/controllers/notes_controller_test.rb index 71dfa42bae..b5b6e68041 100644 --- a/test/controllers/notes_controller_test.rb +++ b/test/controllers/notes_controller_test.rb @@ -67,6 +67,27 @@ def test_index_success assert_response :not_found end + def test_note_with_tags + user = create(:user) + + note = create(:note) + create(:note_comment, :note => note, :author => user, :body => "Note description") + create(:note_tag, :note => note, :k => "created_by", :v => "OSM_TEST") + create(:note_tag, :note => note, :k => "source", :v => "OSM_TEST_SURVEY") + + sidebar_browse_check :note_path, note.id, "notes/show" + assert_dom "h2", :text => "Unresolved note ##{note.id}" + assert_dom "p", :text => "Note description" + assert_dom "tr" do + assert_dom "th", :text => "created_by" + assert_dom "td", :text => "OSM_TEST" + end + assert_dom "tr" do + assert_dom "th", :text => "source" + assert_dom "td", :text => "OSM_TEST_SURVEY" + end + end + def test_index_paged user = create(:user)