assert_tag 'input', :attributes => {:name => 'enumeration[name]'}
end
+ def test_new_with_invalid_type_should_respond_with_404
+ get :new, :type => 'UnknownType'
+ assert_response 404
+ end
+
def test_create
assert_difference 'IssuePriority.count' do
post :create, :enumeration => {:type => 'IssuePriority', :name => 'Lowest'}
assert_tag 'input', :attributes => {:name => 'enumeration[name]', :value => 'High'}
end
+ def test_edit_invalid_should_respond_with_404
+ get :edit, :id => 999
+ assert_response 404
+ end
+
def test_update
assert_no_difference 'IssuePriority.count' do
put :update, :id => 6, :enumeration => {:type => 'IssuePriority', :name => 'New name'}
assert_equal Role.find(1), assigns(:role)
end
+ def test_edit_invalid_should_respond_with_404
+ get :edit, :id => 999
+ assert_response 404
+ end
+
def test_update
put :update, :id => 1,
:role => {:name => 'Manager',