3 class UserChangesetCommentsTest < ActionDispatch::IntegrationTest
4 # Test if the form is shown
5 def test_displaying_form
7 changeset = create(:changeset, :closed)
11 # We should now be at the login page
12 assert_response :success
13 assert_template "sessions/new"
15 post "/login", :params => { "username" => user.email, "password" => "test" }
16 assert_response :redirect
18 get "/changeset/#{changeset.id}"
20 assert_response :success
21 assert_template "browse/changeset"
23 assert_select "div#content" do
24 assert_select "div#sidebar" do
25 assert_select "div#sidebar_content" do
26 assert_select "div" do
27 assert_select "form[action='#']" do
28 assert_select "textarea[name=text]"