assert_select "input[name=commit][type=submit][value=Publish]", :count => 1
assert_select "input[name=commit][type=submit][value=Edit]", :count => 1
assert_select "input[name=commit][type=submit][value=Preview]", :count => 1
- assert_select "input", :count => 7
+ assert_select "input", :count => 6
end
end
end
assert_select "input[name=commit][type=submit][value=Update]", :count => 1
assert_select "input[name=commit][type=submit][value=Edit]", :count => 1
assert_select "input[name=commit][type=submit][value=Preview]", :count => 1
- assert_select "input", :count => 8
+ assert_select "input", :count => 7
end
end
assert_template :show
# Try a non-integer ID
- assert_raise ActionController::RoutingError do
- get "/user/#{CGI.escape(user.display_name)}/diary/#{diary_entry.id})"
- end
+ get "/user/#{CGI.escape(user.display_name)}/diary/#{diary_entry.id})"
+ assert_response :not_found
+ assert_template "rescues/routing_error"
# Try a deleted entry
diary_entry_deleted = create(:diary_entry, :user => user, :visible => false)