diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-12 18:06:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-12 18:06:26 +0300 |
commit | 69944ffb68788d190e81ff7e33db5dcb6c903184 (patch) | |
tree | 4112a1285f186c140749e8410a8a2788b6812500 /spec/models/todo_spec.rb | |
parent | 1b7381e998ff4b33ec8f633766030082e95f10c8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/todo_spec.rb')
-rw-r--r-- | spec/models/todo_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/todo_spec.rb b/spec/models/todo_spec.rb index 487a1c619c6..e79a2bc325b 100644 --- a/spec/models/todo_spec.rb +++ b/spec/models/todo_spec.rb @@ -150,6 +150,19 @@ describe Todo do end end + describe '#done?' do + let_it_be(:todo1) { create(:todo, state: :pending) } + let_it_be(:todo2) { create(:todo, state: :done) } + + it 'returns true for todos with done state' do + expect(todo2.done?).to be_truthy + end + + it 'returns false for todos with state pending' do + expect(todo1.done?).to be_falsey + end + end + describe '#self_assigned?' do let(:user_1) { build(:user) } |