2019-07-07 11:18:12 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-12-04 20:38:33 +05:30
|
|
|
require 'spec_helper'
|
2016-09-13 17:45:13 +05:30
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
RSpec.describe List do
|
2019-02-15 15:39:39 +05:30
|
|
|
it_behaves_like 'having unique enum values'
|
2021-03-08 18:12:59 +05:30
|
|
|
it_behaves_like 'boards listable model', :list
|
2021-04-17 20:07:23 +05:30
|
|
|
it_behaves_like 'list_preferences_for user', :list, :list_id
|
2019-02-15 15:39:39 +05:30
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
describe 'relationships' do
|
|
|
|
it { is_expected.to belong_to(:board) }
|
|
|
|
it { is_expected.to belong_to(:label) }
|
|
|
|
end
|
|
|
|
|
|
|
|
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
|
|
|
|
end
|