From ee12e868688f49498a19fd671146033d135c99ca Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Tue, 21 Feb 2023 19:37:31 -0600 Subject: AƱade spec del atributo rol MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/models/user_account_spec.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'spec') diff --git a/spec/models/user_account_spec.rb b/spec/models/user_account_spec.rb index 0f4dbe9..6ce99e3 100644 --- a/spec/models/user_account_spec.rb +++ b/spec/models/user_account_spec.rb @@ -5,4 +5,5 @@ RSpec.describe UserAccount, type: :model do it { should validate_presence_of(:email) } it { should validate_presence_of(:first_name) } it { should validate_presence_of(:last_name) } + it { should validate_inclusion_of(:role).in_array(%w[master regular]) } end -- cgit v1.2.3