2019-03-30 03:23:56 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-08-29 03:56:52 -04:00
|
|
|
require 'spec_helper'
|
2016-07-27 15:32:32 -04:00
|
|
|
|
2020-06-24 14:09:03 -04:00
|
|
|
RSpec.describe List do
|
2018-12-03 08:01:30 -05:00
|
|
|
it_behaves_like 'having unique enum values'
|
2021-01-12 10:10:37 -05:00
|
|
|
it_behaves_like 'boards listable model', :list
|
2021-02-24 10:11:10 -05:00
|
|
|
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) }
|
2016-07-31 19:45:56 -04:00
|
|
|
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) }
|
2016-07-31 19:45:56 -04:00
|
|
|
end
|
2016-07-27 15:32:32 -04:00
|
|
|
end
|