@@ -51,7 +51,7 @@ class ChecksControllerTest < ActionDispatch::IntegrationTest
5151 test "should create check" do
5252 assert_difference ( "Check.count" ) do
5353 post checks_url , params : {
54- check : { cron : @check . cron , url : @check . url , name : @check . name }
54+ check : { cron : @check . cron , url : @check . url , name : @check . name }
5555 }
5656 end
5757 assert_redirected_to check_url ( Check . last )
@@ -60,23 +60,23 @@ class ChecksControllerTest < ActionDispatch::IntegrationTest
6060 test "should create check as JSON" do
6161 assert_difference ( "Check.count" ) do
6262 post checks_url , params : {
63- check : { cron : @check . cron , url : @check . url , name : @check . name }
63+ check : { cron : @check . cron , url : @check . url , name : @check . name }
6464 } , as : :json
6565 end
6666 assert_response :created
6767 end
6868
6969 test "should not create check with invalid params" do
7070 assert_no_difference ( "Check.count" ) do
71- post checks_url , params : { check : { name : "" , url : "not-a-url" , cron : "bad" } }
71+ post checks_url , params : { check : { name : "" , url : "not-a-url" , cron : "bad" } }
7272 end
7373 assert_response :unprocessable_entity
7474 end
7575
7676 test "should not create check with invalid params as JSON" do
7777 assert_no_difference ( "Check.count" ) do
7878 post checks_url , params : {
79- check : { name : "" , url : "not-a-url" , cron : "bad" }
79+ check : { name : "" , url : "not-a-url" , cron : "bad" }
8080 } , as : :json
8181 end
8282 assert_response :unprocessable_entity
@@ -108,29 +108,29 @@ class ChecksControllerTest < ActionDispatch::IntegrationTest
108108
109109 test "should update check" do
110110 patch check_url ( @check ) , params : {
111- check : { cron : @check . cron , url : @check . url , name : @check . name }
111+ check : { cron : @check . cron , url : @check . url , name : @check . name }
112112 }
113113 assert_redirected_to check_url ( @check )
114114 end
115115
116116 test "should update check as JSON" do
117117 patch check_url ( @check ) , params : {
118- check : { cron : @check . cron , url : @check . url , name : "Updated Name" }
118+ check : { cron : @check . cron , url : @check . url , name : "Updated Name" }
119119 } , as : :json
120120 assert_response :ok
121121 assert_equal "Updated Name" , @check . reload . name
122122 end
123123
124124 test "should not update check with invalid params" do
125125 patch check_url ( @check ) , params : {
126- check : { name : "" , url : "not-a-url" , cron : "bad" }
126+ check : { name : "" , url : "not-a-url" , cron : "bad" }
127127 }
128128 assert_response :unprocessable_entity
129129 end
130130
131131 test "should not update check with invalid params as JSON" do
132132 patch check_url ( @check ) , params : {
133- check : { name : "" , url : "not-a-url" , cron : "bad" }
133+ check : { name : "" , url : "not-a-url" , cron : "bad" }
134134 } , as : :json
135135 assert_response :unprocessable_entity
136136 end
0 commit comments