diff options
author | Douwe Maan <douwe@selenight.nl> | 2018-01-31 19:52:09 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2018-02-06 21:06:38 +0300 |
commit | 75144b1e03db342730535f1f49b0e7cd2987d755 (patch) | |
tree | 30295c514e238b48a646d77c6b453e2ec44319f4 /spec/models/route_spec.rb | |
parent | 8d69436c901a3eee674e72c67d91de3994d30e0c (diff) |
Validate path uniqueness only on Route, and bubble up appropriately
Diffstat (limited to 'spec/models/route_spec.rb')
-rw-r--r-- | spec/models/route_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/route_spec.rb b/spec/models/route_spec.rb index 88f54fd10e5..dfac82b327a 100644 --- a/spec/models/route_spec.rb +++ b/spec/models/route_spec.rb @@ -27,7 +27,7 @@ describe Route do redirect.save!(validate: false) expect(new_route.valid?).to be_falsey - expect(new_route.errors.first[1]).to eq('foo has been taken before. Please use another one') + expect(new_route.errors.first[1]).to eq('has been taken before') end end @@ -49,7 +49,7 @@ describe Route do redirect.save!(validate: false) expect(route.valid?).to be_falsey - expect(route.errors.first[1]).to eq('foo has been taken before. Please use another one') + expect(route.errors.first[1]).to eq('has been taken before') end end @@ -368,7 +368,7 @@ describe Route do group2.path = 'foo' group2.valid? - expect(group2.errors["route.path"].first).to eq('foo has been taken before. Please use another one') + expect(group2.errors[:path]).to eq(['has been taken before']) end end |