summaryrefslogtreecommitdiff
path: root/spec/models/company_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/company_spec.rb')
-rw-r--r--spec/models/company_spec.rb11
1 files changed, 11 insertions, 0 deletions
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