diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-08-16 14:38:43 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-08-17 12:58:59 -0300 |
commit | 50ac488c739718902ba897bc5ad8791d35914324 (patch) | |
tree | cc3e5cb1b9da7401a5068c510f06e36cdee51f13 /spec/models/list_spec.rb | |
parent | c6511235e4253d11447b40c2ea42ecb02c99687e (diff) | |
download | gitlab-ce-50ac488c739718902ba897bc5ad8791d35914324.tar.gz |
Add a movable scope and a movable? method to List model
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 d5c60f65043..9e1a52011c3 100644 --- a/spec/models/list_spec.rb +++ b/spec/models/list_spec.rb @@ -74,6 +74,26 @@ describe List do end end + describe '#movable?' do + it 'retruns true when list_type is set to label' do + subject.list_type = :label + + expect(subject).to be_movable + end + + it 'retruns false when list_type is set to backlog' do + subject.list_type = :backlog + + expect(subject).not_to be_movable + end + + it 'retruns false when list_type is set to done' do + subject.list_type = :done + + expect(subject).not_to be_movable + end + end + describe '#title' do it 'returns label name when list_type is set to label' do subject.list_type = :label |