Skip to content

Commit b273d1f

Browse files
committed
Update test to new deprecation logic
1 parent 4dfcd0d commit b273d1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/cases/base_errors_test.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def test_should_parse_json_string_errors_with_an_errors_key
116116
mock.post "/people.json", {}, %q({"errors":["Age can't be blank", "Name can't be blank", "Name must start with a letter", "Person quota full for today.", "Phone work can't be blank", "Phone is not valid"]}), 422, "Content-Type" => "application/json; charset=utf-8"
117117
end
118118

119-
assert_deprecated(/as an array/) do
119+
assert_deprecated(/as an array/, ActiveResource.deprecator) do
120120
invalid_user_using_format(:json) do
121121
assert @person.errors[:name].any?
122122
assert_equal ["can't be blank"], @person.errors[:age]
@@ -133,7 +133,7 @@ def test_should_parse_3_1_style_json_errors
133133
mock.post "/people.json", {}, %q({"age":["can't be blank"],"name":["can't be blank", "must start with a letter"],"person":["quota full for today."],"phone_work":["can't be blank"],"phone":["is not valid"]}), 422, "Content-Type" => "application/json; charset=utf-8"
134134
end
135135

136-
assert_deprecated(/without a root/) do
136+
assert_deprecated(/without a root/, ActiveResource.deprecator) do
137137
invalid_user_using_format(:json) do
138138
assert @person.errors[:name].any?
139139
assert_equal ["can't be blank"], @person.errors[:age]

0 commit comments

Comments
 (0)