gitlab-org--gitlab-foss/spec/models/list_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
568 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require 'spec_helper'
2016-07-27 15:32:32 -04:00
RSpec.describe List do
2018-12-03 08:01:30 -05:00
it_behaves_like 'having unique enum values'
it_behaves_like 'boards listable model', :list
it_behaves_like 'list_preferences_for user', :list, :list_id
2018-12-03 07:47:26 -05:00
2016-07-27 15:32:32 -04:00
describe 'relationships' do
it { is_expected.to belong_to(:board) }
it { is_expected.to belong_to(:label) }
end
2016-07-27 15:32:32 -04:00
describe 'validations' do
it { is_expected.to validate_presence_of(:board) }
it { is_expected.to validate_presence_of(:label) }
it { is_expected.to validate_presence_of(:list_type) }
end
2016-07-27 15:32:32 -04:00
end