diff --git a/app/models/client.rb b/app/models/client.rb index 89b415a20..19327b459 100644 --- a/app/models/client.rb +++ b/app/models/client.rb @@ -419,7 +419,7 @@ def check_language def check_certificate Array.wrap(certificate).each do |c| - errors.add(:certificate, "Certificate #{c} is not included in the list of supported certificates.") unless ["CoreTrustSeal", "DIN 31644", "DINI", "DSA", "RatSWD", "WDS"].include?(c) + errors.add(:certificate, "Certificate #{c} is not included in the list of supported certificates.") unless ["CoreTrustSeal", "DIN 31644", "DINI", "DSA", "RatSWD", "WDS", "CLARIN"].include?(c) end end diff --git a/spec/models/client_spec.rb b/spec/models/client_spec.rb index 7579f4977..2805364ec 100644 --- a/spec/models/client_spec.rb +++ b/spec/models/client_spec.rb @@ -61,6 +61,12 @@ expect(client.errors.details).to be_empty end + it "should support certificate" do + client.certificate = ["CLARIN"] + expect(client.save).to be true + expect(client.errors.details).to be_empty + end + it "should support multiple certificates" do client.certificate = ["WDS", "DSA"] expect(client.save).to be true