|
120 | 120 | it "adds the uniqueness error to the aliased field name" do
|
121 | 121 | dictionary.valid?
|
122 | 122 | expect(dictionary.errors).to have_key(:language)
|
123 |
| - expect(dictionary.errors[:language]).to eq([ "is already taken" ]) |
| 123 | + expect(dictionary.errors[:language]).to eq([ "has already been taken" ]) |
124 | 124 | end
|
125 | 125 | end
|
126 | 126 |
|
|
137 | 137 | it "adds the uniqueness error to the underlying field name" do
|
138 | 138 | dictionary.valid?
|
139 | 139 | expect(dictionary.errors).to have_key(:l)
|
140 |
| - expect(dictionary.errors[:l]).to eq([ "is already taken" ]) |
| 140 | + expect(dictionary.errors[:l]).to eq([ "has already been taken" ]) |
141 | 141 | end
|
142 | 142 | end
|
143 | 143 | end
|
|
239 | 239 |
|
240 | 240 | it "adds the uniqueness error" do
|
241 | 241 | dictionary.valid?
|
242 |
| - expect(dictionary.errors[:description]).to eq([ "is already taken" ]) |
| 242 | + expect(dictionary.errors[:description]).to eq([ "has already been taken" ]) |
243 | 243 | end
|
244 | 244 | end
|
245 | 245 |
|
|
260 | 260 |
|
261 | 261 | it "adds the uniqueness error" do
|
262 | 262 | dictionary.valid?
|
263 |
| - expect(dictionary.errors[:description]).to eq([ "is already taken" ]) |
| 263 | + expect(dictionary.errors[:description]).to eq([ "has already been taken" ]) |
264 | 264 | end
|
265 | 265 | end
|
266 | 266 | end
|
|
330 | 330 |
|
331 | 331 | it "adds the uniqueness error" do
|
332 | 332 | dictionary.valid?
|
333 |
| - expect(dictionary.errors[:description]).to eq([ "is already taken" ]) |
| 333 | + expect(dictionary.errors[:description]).to eq([ "has already been taken" ]) |
334 | 334 | end
|
335 | 335 | end
|
336 | 336 |
|
|
351 | 351 |
|
352 | 352 | it "adds the uniqueness error" do
|
353 | 353 | dictionary.valid?
|
354 |
| - expect(dictionary.errors[:description]).to eq([ "is already taken" ]) |
| 354 | + expect(dictionary.errors[:description]).to eq([ "has already been taken" ]) |
355 | 355 | end
|
356 | 356 | end
|
357 | 357 | end
|
|
399 | 399 |
|
400 | 400 | it "adds the uniqueness error" do
|
401 | 401 | dictionary.valid?
|
402 |
| - expect(dictionary.errors[:description]).to eq([ "is already taken" ]) |
| 402 | + expect(dictionary.errors[:description]).to eq([ "has already been taken" ]) |
403 | 403 | end
|
404 | 404 | end
|
405 | 405 | end
|
|
460 | 460 |
|
461 | 461 | it "adds the uniqueness error" do
|
462 | 462 | dictionary.valid?
|
463 |
| - expect(dictionary.errors[:name]).to eq([ "is already taken" ]) |
| 463 | + expect(dictionary.errors[:name]).to eq([ "has already been taken" ]) |
464 | 464 | end
|
465 | 465 | end
|
466 | 466 |
|
|
623 | 623 |
|
624 | 624 | it "adds the uniqueness errors" do
|
625 | 625 | dictionary.valid?
|
626 |
| - expect(dictionary.errors[:name]).to eq([ "is already taken" ]) |
| 626 | + expect(dictionary.errors[:name]).to eq([ "has already been taken" ]) |
627 | 627 | end
|
628 | 628 | end
|
629 | 629 |
|
|
701 | 701 |
|
702 | 702 | it "should set an error for associated object not being unique" do
|
703 | 703 | item.update_attributes(folder_id: personal_folder.id)
|
704 |
| - expect(item.errors.messages[:name].first).to eq("is already taken") |
| 704 | + expect(item.errors.messages[:name].first).to eq("has already been taken") |
705 | 705 | end
|
706 | 706 | end
|
707 | 707 |
|
|
753 | 753 |
|
754 | 754 | it "adds the uniqueness errors" do
|
755 | 755 | dictionary.valid?
|
756 |
| - expect(dictionary.errors[:name]).to eq([ "is already taken" ]) |
| 756 | + expect(dictionary.errors[:name]).to eq([ "has already been taken" ]) |
757 | 757 | end
|
758 | 758 | end
|
759 | 759 |
|
|
792 | 792 |
|
793 | 793 | it "adds the uniqueness errors" do
|
794 | 794 | dictionary.valid?
|
795 |
| - expect(dictionary.errors[:name]).to eq([ "is already taken" ]) |
| 795 | + expect(dictionary.errors[:name]).to eq([ "has already been taken" ]) |
796 | 796 | end
|
797 | 797 | end
|
798 | 798 | end
|
|
815 | 815 |
|
816 | 816 | expect do
|
817 | 817 | Dictionary.create!(name: "French-English", year: 1960)
|
818 |
| - end.to raise_error(Mongoid::Errors::Validations, /Name is already taken/) |
| 818 | + end.to raise_error(Mongoid::Errors::Validations, /Name has already been taken/) |
819 | 819 |
|
820 | 820 | expect(Dictionary.all.size).to eq(1)
|
821 | 821 | end
|
|
954 | 954 |
|
955 | 955 | it "adds the uniqueness errors" do
|
956 | 956 | dictionary.valid?
|
957 |
| - expect(dictionary.errors[:name]).to eq([ "is already taken" ]) |
| 957 | + expect(dictionary.errors[:name]).to eq([ "has already been taken" ]) |
958 | 958 | end
|
959 | 959 | end
|
960 | 960 |
|
|
1018 | 1018 |
|
1019 | 1019 | it "adds the uniqueness error" do
|
1020 | 1020 | dictionary.valid?
|
1021 |
| - expect(dictionary.errors[:name]).to eq([ "is already taken" ]) |
| 1021 | + expect(dictionary.errors[:name]).to eq([ "has already been taken" ]) |
1022 | 1022 | end
|
1023 | 1023 | end
|
1024 | 1024 |
|
|
1096 | 1096 |
|
1097 | 1097 | it "adds the uniqueness error" do
|
1098 | 1098 | dictionary.valid?
|
1099 |
| - expect(dictionary.errors[:name]).to eq([ "is already taken" ]) |
| 1099 | + expect(dictionary.errors[:name]).to eq([ "has already been taken" ]) |
1100 | 1100 | end
|
1101 | 1101 | end
|
1102 | 1102 |
|
|
1218 | 1218 |
|
1219 | 1219 | it "adds the uniqueness error" do
|
1220 | 1220 | login.valid?
|
1221 |
| - expect(login.errors[:username]).to eq([ "is already taken" ]) |
| 1221 | + expect(login.errors[:username]).to eq([ "has already been taken" ]) |
1222 | 1222 | end
|
1223 | 1223 | end
|
1224 | 1224 |
|
|
1323 | 1323 |
|
1324 | 1324 | it "adds the uniqueness errors" do
|
1325 | 1325 | login.valid?
|
1326 |
| - expect(login.errors[:username]).to eq([ "is already taken" ]) |
| 1326 | + expect(login.errors[:username]).to eq([ "has already been taken" ]) |
1327 | 1327 | end
|
1328 | 1328 | end
|
1329 | 1329 |
|
|
1383 | 1383 |
|
1384 | 1384 | it "adds the uniqueness error" do
|
1385 | 1385 | login.valid?
|
1386 |
| - expect(login.errors[:username]).to eq([ "is already taken" ]) |
| 1386 | + expect(login.errors[:username]).to eq([ "has already been taken" ]) |
1387 | 1387 | end
|
1388 | 1388 | end
|
1389 | 1389 |
|
|
1461 | 1461 |
|
1462 | 1462 | it "adds the uniqueness error" do
|
1463 | 1463 | login.valid?
|
1464 |
| - expect(login.errors[:username]).to eq([ "is already taken" ]) |
| 1464 | + expect(login.errors[:username]).to eq([ "has already been taken" ]) |
1465 | 1465 | end
|
1466 | 1466 | end
|
1467 | 1467 |
|
|
1710 | 1710 |
|
1711 | 1711 | it "adds the uniqueness error" do
|
1712 | 1712 | definition.valid?
|
1713 |
| - expect(definition.errors[:description]).to eq([ "is already taken" ]) |
| 1713 | + expect(definition.errors[:description]).to eq([ "has already been taken" ]) |
1714 | 1714 | end
|
1715 | 1715 | end
|
1716 | 1716 |
|
|
1838 | 1838 |
|
1839 | 1839 | it "adds the uniqueness errors" do
|
1840 | 1840 | definition.valid?
|
1841 |
| - expect(definition.errors[:description]).to eq([ "is already taken" ]) |
| 1841 | + expect(definition.errors[:description]).to eq([ "has already been taken" ]) |
1842 | 1842 | end
|
1843 | 1843 | end
|
1844 | 1844 |
|
|
1976 | 1976 |
|
1977 | 1977 | it "adds the uniqueness errors" do
|
1978 | 1978 | definition.valid?
|
1979 |
| - expect(definition.errors[:description]).to eq([ "is already taken" ]) |
| 1979 | + expect(definition.errors[:description]).to eq([ "has already been taken" ]) |
1980 | 1980 | end
|
1981 | 1981 | end
|
1982 | 1982 |
|
|
2040 | 2040 |
|
2041 | 2041 | it "adds the uniqueness error" do
|
2042 | 2042 | definition.valid?
|
2043 |
| - expect(definition.errors[:description]).to eq([ "is already taken" ]) |
| 2043 | + expect(definition.errors[:description]).to eq([ "has already been taken" ]) |
2044 | 2044 | end
|
2045 | 2045 | end
|
2046 | 2046 |
|
|
2118 | 2118 |
|
2119 | 2119 | it "adds the uniqueness error" do
|
2120 | 2120 | definition.valid?
|
2121 |
| - expect(definition.errors[:description]).to eq([ "is already taken" ]) |
| 2121 | + expect(definition.errors[:description]).to eq([ "has already been taken" ]) |
2122 | 2122 | end
|
2123 | 2123 | end
|
2124 | 2124 |
|
|
2214 | 2214 | it "adds the uniqueness error to the aliased field name" do
|
2215 | 2215 | definition.valid?
|
2216 | 2216 | expect(definition.errors).to have_key(:part)
|
2217 |
| - expect(definition.errors[:part]).to eq([ "is already taken" ]) |
| 2217 | + expect(definition.errors[:part]).to eq([ "has already been taken" ]) |
2218 | 2218 | end
|
2219 | 2219 | end
|
2220 | 2220 |
|
|
2231 | 2231 | it "adds the uniqueness error to the underlying field name" do
|
2232 | 2232 | definition.valid?
|
2233 | 2233 | expect(definition.errors).to have_key(:p)
|
2234 |
| - expect(definition.errors[:p]).to eq([ "is already taken" ]) |
| 2234 | + expect(definition.errors[:p]).to eq([ "has already been taken" ]) |
2235 | 2235 | end
|
2236 | 2236 | end
|
2237 | 2237 |
|
|
2250 | 2250 | it "adds the uniqueness error to the aliased field name" do
|
2251 | 2251 | definition.valid?
|
2252 | 2252 | expect(definition.errors).to have_key(:synonyms)
|
2253 |
| - expect(definition.errors[:synonyms]).to eq([ "is already taken" ]) |
| 2253 | + expect(definition.errors[:synonyms]).to eq([ "has already been taken" ]) |
2254 | 2254 | end
|
2255 | 2255 | end
|
2256 | 2256 |
|
|
2267 | 2267 | it "adds the uniqueness error to the aliased field name" do
|
2268 | 2268 | definition.valid?
|
2269 | 2269 | expect(definition.errors).to have_key(:syn)
|
2270 |
| - expect(definition.errors[:syn]).to eq([ "is already taken" ]) |
| 2270 | + expect(definition.errors[:syn]).to eq([ "has already been taken" ]) |
2271 | 2271 | end
|
2272 | 2272 | end
|
2273 | 2273 | end
|
|
2319 | 2319 |
|
2320 | 2320 | it "adds the uniqueness error" do
|
2321 | 2321 | word_origin.valid?
|
2322 |
| - expect(word_origin.errors[:origin_id]).to eq([ "is already taken" ]) |
| 2322 | + expect(word_origin.errors[:origin_id]).to eq([ "has already been taken" ]) |
2323 | 2323 | end
|
2324 | 2324 | end
|
2325 | 2325 |
|
@@ -2444,7 +2444,7 @@ class SpanishActor < EuropeanActor
|
2444 | 2444 | it "should be invalid" do
|
2445 | 2445 | subclass_document_with_duplicated_name.tap do |d|
|
2446 | 2446 | expect(d).to be_invalid
|
2447 |
| - expect(d.errors[:name]).to eq([ "is already taken" ]) |
| 2447 | + expect(d.errors[:name]).to eq([ "has already been taken" ]) |
2448 | 2448 | end
|
2449 | 2449 | end
|
2450 | 2450 | end
|
|
0 commit comments