summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-03-16 20:56:23 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-03-18 11:00:53 -0300
commitfb72271e24663c74e6dd66e610fd1add98628648 (patch)
tree35f8efea08d81fde6bdf5f5e48c86ecbbe2e5ce4 /spec
parentc29da3f8ca1d759b8cbecb91b6e0529b18cc5c85 (diff)
downloadgitlab-ce-fb72271e24663c74e6dd66e610fd1add98628648.tar.gz
Use todo.done without ! in the controller to mark todo as done
Diffstat (limited to 'spec')
-rw-r--r--spec/models/todo_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/todo_spec.rb b/spec/models/todo_spec.rb
index 3e59443589c..76182863024 100644
--- a/spec/models/todo_spec.rb
+++ b/spec/models/todo_spec.rb
@@ -73,15 +73,15 @@ describe Todo, models: true do
end
end
- describe '#done!' do
+ describe '#done' do
it 'changes state to done' do
todo = create(:todo, state: :pending)
- expect { todo.done! }.to change(todo, :state).from('pending').to('done')
+ expect { todo.done }.to change(todo, :state).from('pending').to('done')
end
it 'does not raise error when is already done' do
todo = create(:todo, state: :done)
- expect { todo.done! }.not_to raise_error
+ expect { todo.done }.not_to raise_error
end
end