diff options
Diffstat (limited to 'spec/models/list_spec.rb')
-rw-r--r-- | spec/models/list_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/models/list_spec.rb b/spec/models/list_spec.rb index 664d12a2fd3..d5c60f65043 100644 --- a/spec/models/list_spec.rb +++ b/spec/models/list_spec.rb @@ -54,6 +54,26 @@ describe List do end end + describe '#destroyable?' do + it 'retruns true when list_type is set to label' do + subject.list_type = :label + + expect(subject).to be_destroyable + end + + it 'retruns false when list_type is set to backlog' do + subject.list_type = :backlog + + expect(subject).not_to be_destroyable + end + + it 'retruns false when list_type is set to done' do + subject.list_type = :done + + expect(subject).not_to be_destroyable + end + end + describe '#title' do it 'returns label name when list_type is set to label' do subject.list_type = :label |