]> git.openstreetmap.org Git - rails.git/blob - test/system/diary_entry_test.rb
separate ability and capability
[rails.git] / test / system / diary_entry_test.rb
1 require "application_system_test_case"
2
3 class DiaryEntrySystemTest < ApplicationSystemTestCase
4   def setup
5     create(:language, :code => "en")
6     @diary_entry = create(:diary_entry)
7   end
8
9   test "reply to diary entry should prefill the message subject" do
10     sign_in_as(create(:user))
11     visit diary_path
12
13     click_on "Reply to this entry"
14
15     assert page.has_content? "Send a new message"
16     assert_equal "Re: #{@diary_entry.title}", page.find_field("Subject").value
17   end
18 end