From 2b0426a4971480c6d9868ac6865d3827485fe8d1 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin <godfat@godfat.org> Date: Tue, 21 Feb 2017 18:46:52 +0800 Subject: [PATCH] Fix tests due to error key changed --- app/models/application_setting.rb | 2 +- spec/models/application_setting_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index b5ffc5f9ca9..1349587fb0a 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -309,6 +309,6 @@ class ApplicationSetting < ActiveRecord::Base def check_default_artifacts_expire_in ChronicDuration.parse(default_artifacts_expire_in) rescue ChronicDuration::DurationParseError - errors.add(:default_artifacts_expiration, "is not a correct duration") + errors.add(:default_artifacts_expire_in, "is not a correct duration") end end diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb index f8c38ed8569..b3eb206612e 100644 --- a/spec/models/application_setting_spec.rb +++ b/spec/models/application_setting_spec.rb @@ -59,7 +59,7 @@ describe ApplicationSetting, models: true do def expect_invalid expect(setting).to be_invalid expect(setting.errors.messages) - .to have_key(:default_artifacts_expiration) + .to have_key(:default_artifacts_expire_in) end end -- GitLab