2019-03-30 07:23:56 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-09-25 16:54:08 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 18:09:03 +00:00
|
|
|
RSpec.describe Ci::BuildTraceSectionName, model: true do
|
2017-09-25 16:54:08 +00:00
|
|
|
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
|