Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-08-16 20:38:43 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-08-17 18:58:59 +0300
commit50ac488c739718902ba897bc5ad8791d35914324 (patch)
treecc3e5cb1b9da7401a5068c510f06e36cdee51f13 /spec/models/list_spec.rb
parentc6511235e4253d11447b40c2ea42ecb02c99687e (diff)
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.rb20
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