X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/fc90b7358124ce9017a94b3f6e4a779fbc28c71c..0a86a1ea8db0867c34f7d9dff602ee3da6036bcd:/test/system/diary_entry_test.rb diff --git a/test/system/diary_entry_test.rb b/test/system/diary_entry_test.rb new file mode 100644 index 000000000..b8eb5f667 --- /dev/null +++ b/test/system/diary_entry_test.rb @@ -0,0 +1,18 @@ +require "application_system_test_case" + +class DiaryEntryTest < ApplicationSystemTestCase + def setup + create(:language, :code => "en") + @diary_entry = create(:diary_entry) + end + + test "reply to diary entry should prefill the message subject" do + sign_in_as(create(:user)) + visit diary_path + + click_on "Reply to this entry" + + assert page.has_content? "Send a new message" + assert_equal "Re: #{@diary_entry.title}", page.find_field("Subject").value + end +end