summaryrefslogtreecommitdiff
path: root/spec/models/ci/build_trace_section_name_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/ci/build_trace_section_name_spec.rb')
-rw-r--r--spec/models/ci/build_trace_section_name_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/ci/build_trace_section_name_spec.rb b/spec/models/ci/build_trace_section_name_spec.rb
new file mode 100644
index 00000000000..386ee6880cb
--- /dev/null
+++ b/spec/models/ci/build_trace_section_name_spec.rb
@@ -0,0 +1,12 @@
+require 'spec_helper'
+
+describe Ci::BuildTraceSectionName, model: true do
+ subject { build(:ci_build_trace_section_name) }
+
+ it { is_expected.to belong_to(:project) }
+ it { is_expected.to have_many(:trace_sections)}
+
+ it { is_expected.to validate_presence_of(:project) }
+ it { is_expected.to validate_presence_of(:name) }
+ it { is_expected.to validate_uniqueness_of(:name).scoped_to(:project_id) }
+end