debian-mirror-gitlab/spec/models/ci/build_trace_section_name_spec.rb
2020-08-09 17:44:08 +05:30

14 lines
445 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
RSpec.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