From 6cf54e76f0ca4b30f6883f15c3a64aca4f4eddd2 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Thu, 9 Mar 2023 18:56:25 -0600 Subject: AƱade modelo company MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/models/company_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 spec/models/company_spec.rb (limited to 'spec') diff --git a/spec/models/company_spec.rb b/spec/models/company_spec.rb new file mode 100644 index 0000000..7fe3a87 --- /dev/null +++ b/spec/models/company_spec.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe Company, type: :model do + it { should validate_presence_of(:name) } + it { should validate_presence_of(:short_name) } + it { should validate_presence_of(:country) } + it { should validate_uniqueness_of(:short_name).ignoring_case_sensitivity } + it { should have_one_attached(:logo) } +end -- cgit v1.2.3