]> git.openstreetmap.org Git - rails.git/blobdiff - test/system/diary_entry_test.rb
Fix handling of title when replying to diary entries
[rails.git] / 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 (file)
index 0000000..b8eb5f6
--- /dev/null
@@ -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