Skip to content

Commit

Permalink
support clarin certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Feb 28, 2020
1 parent fc5c2a1 commit fdad144
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions spec/models/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fdad144

Please sign in to comment.