- browse_check :node_history_path, create(:node, :with_history).id, "browse/history"
- end
-
- def test_read_changeset
- user = create(:user)
- changeset = create(:changeset, :user => user)
- create(:changeset, :user => user)
- browse_check :changeset_path, changeset.id, "browse/changeset"
- end
-
- def test_read_private_changeset
- user = create(:user)
- changeset = create(:changeset, :user => create(:user, :data_public => false))
- create(:changeset, :user => user)
- browse_check :changeset_path, changeset.id, "browse/changeset"
- end
-
- def test_read_changeset_hidden_comments
- changeset = create(:changeset)
- create_list(:changeset_comment, 3, :changeset => changeset)
- create(:changeset_comment, :visible => false, :changeset => changeset)
-
- browse_check :changeset_path, changeset.id, "browse/changeset"
- assert_select "div.changeset-comments ul li", :count => 3
-
- session_for(create(:moderator_user))
-
- browse_check :changeset_path, changeset.id, "browse/changeset"
- assert_select "div.changeset-comments ul li", :count => 4
+ node = create(:node, :with_history)
+ sidebar_browse_check :node_history_path, node.id, "browse/history"
+ assert_select "h4", /^Version/ do
+ assert_select "a[href='#{old_node_path node, 1}']", :text => "1", :count => 1
+ end