Update test code. (r-labs issueId: 1364)

This commit is contained in:
Akiko Takano
2015-03-01 05:49:39 +09:00
parent c211b20f7c
commit 64d7951431

View File

@@ -24,11 +24,11 @@ class GlobalIssueTemplatesControllerTest < ActionController::TestCase
setup do
end
should "should get index" do
should "get index" do
get :index
assert_response :success
assert_template 'index'
assert_not_nil assigns(:global_issue_templates)
assert_not_nil assigns(:template_map)
end
end
@@ -53,6 +53,14 @@ class GlobalIssueTemplatesControllerTest < ActionController::TestCase
:action => "index"
assert_raise(ActiveRecord::RecordNotFound) {GlobalIssueTemplate.find(2)}
end
should "move to bottom and top" do
global_issue_template = GlobalIssueTemplate.find(1)
get :move, :tracler_id => 1, :id => 1, :to => :to_bottom
assert_equal 3, global_issue_template.reload.position
get :move, :tracler_id => 1, :id => 1, :to => :to_top
assert_equal 1, global_issue_template.reload.position
end
end
end