- browse_check :relation_path, create(:relation).id, "browse/feature"
- end
-
- def test_read_relation_history
- browse_check :relation_history_path, create(:relation, :with_history).id, "browse/history"
- end
-
- def test_read_way
- browse_check :way_path, create(:way).id, "browse/feature"
- end
-
- def test_read_way_history
- browse_check :way_history_path, create(:way, :with_history).id, "browse/history"
- end
-
- def test_read_node
- browse_check :node_path, create(:node).id, "browse/feature"
- end
-
- def test_read_node_history
- browse_check :node_history_path, create(:node, :with_history).id, "browse/history"
+ relation = create(:relation)
+ sidebar_browse_check :relation_path, relation.id, "browse/feature"
+ assert_select "h4", /^Version/ do
+ assert_select "a[href='#{old_relation_path relation, 1}']", :text => "1", :count => 1
+ end
+ assert_select ".secondary-actions a[href='#{api_relation_path relation}']", :count => 1
+ assert_select ".secondary-actions a[href='#{relation_history_path relation}']", :count => 1
+ assert_select ".secondary-actions a[href='#{old_relation_path relation, 1}']", :count => 0