Merge pull request #2272 from rtrunkhill/620-error-message-tweak

changed error message in en.yml line 2207
This commit is contained in:
Maikel
2018-05-18 11:19:45 +10:00
committed by GitHub
2 changed files with 5 additions and 7 deletions

View File

@@ -2208,7 +2208,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
content_configuration_pricing_table: "(TODO: Pricing table)"
content_configuration_case_studies: "(TODO: Case studies)"
content_configuration_detail: "(TODO: Detail)"
enterprise_name_error: "has already been taken. If this is your enterprise and you would like to claim ownership, please contact the current manager of this profile at %{email}."
enterprise_name_error: "has already been taken. If this is your enterprise and you would like to claim ownership, or if you would like to trade with this enterprise please contact the current manager of this profile at %{email}."
enterprise_owner_error: "^%{email} is not permitted to own any more enterprises (limit is %{enterprise_limit})."
enterprise_role_uniqueness_error: "^That role is already present."
inventory_item_visibility_error: must be true or false

View File

@@ -129,17 +129,15 @@ describe Enterprise do
it "prevents duplicate names for new records" do
e = Enterprise.new name: enterprise.name
e.should_not be_valid
e.errors[:name].first.should ==
"has already been taken. If this is your enterprise and you would like to claim ownership, please contact the current manager of this profile at owner@example.com."
expect(e).to_not be_valid
expect(e.errors[:name].first).to include I18n.t('enterprise_name_error', email: owner.email)
end
it "prevents duplicate names for existing records" do
e = create(:enterprise, name: 'foo')
e.name = enterprise.name
e.should_not be_valid
e.errors[:name].first.should ==
"has already been taken. If this is your enterprise and you would like to claim ownership, please contact the current manager of this profile at owner@example.com."
expect(e).to_not be_valid
expect(e.errors[:name].first).to include I18n.t('enterprise_name_error', email: owner.email)
end
it "does not prohibit the saving of an enterprise with no name clash" do