summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-03-13 19:48:40 -0600
committerHombreLaser <sebastian-440@live.com>2023-03-13 19:48:40 -0600
commit5c899df07753a31543f8dad725a26ccddc44dfe2 (patch)
treecc13040e9f859688ec2ec454486528394bbc1cde /spec/models
parent3dae1ce143d006cc75940b746a8eb74982e6e861 (diff)
Añade método update a UserAccountsController
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/company_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/company_spec.rb b/spec/models/company_spec.rb
index 7fe3a87..0d254a8 100644
--- a/spec/models/company_spec.rb
+++ b/spec/models/company_spec.rb
@@ -3,9 +3,17 @@
require 'rails_helper'
RSpec.describe Company, type: :model do
+ let(:company) { create(:company) }
+
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) }
+
+ describe '#to_param' do
+ it "returns the model's url param" do
+ expect(company.to_param).to eq(company.short_name)
+ end
+ end
end