Replaced some #assert_tag with #assert_select.

git-svn-id: http://svn.redmine.org/redmine/trunk@13620 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2014-11-20 19:57:06 +00:00
parent 2a43f1adbc
commit 36d487fe50
8 changed files with 41 additions and 62 deletions

View File

@@ -41,8 +41,8 @@ class EnumerationsControllerTest < ActionController::TestCase
assert_response :success
assert_template 'new'
assert_kind_of IssuePriority, assigns(:enumeration)
assert_tag 'input', :attributes => {:name => 'enumeration[type]', :value => 'IssuePriority'}
assert_tag 'input', :attributes => {:name => 'enumeration[name]'}
assert_select 'input[name=?][value=?]', 'enumeration[type]', 'IssuePriority'
assert_select 'input[name=?]', 'enumeration[name]'
end
def test_new_with_invalid_type_should_respond_with_404
@@ -71,7 +71,7 @@ class EnumerationsControllerTest < ActionController::TestCase
get :edit, :id => 6
assert_response :success
assert_template 'edit'
assert_tag 'input', :attributes => {:name => 'enumeration[name]', :value => 'High'}
assert_select 'input[name=?][value=?]', 'enumeration[name]', 'High'
end
def test_edit_invalid_should_respond_with_404