spec/models/dorsale/flyboy/task_spec.rb in dorsale-3.20.0 vs spec/models/dorsale/flyboy/task_spec.rb in dorsale-4.0.0
- old
+ new
@@ -233,11 +233,11 @@
let!(:task) { create(:flyboy_task, term: "2019-10-02") }
let!(:author) { create(:user) }
it "should create comment" do
expect {
- task.create_term_changed_comment!(previous: Date.new(2019, 10, 1), author: author)
+ task.create_term_changed_comment!(previous: Date.new(2019, 10, 1), author:)
}.to change(Dorsale::Flyboy::TaskComment, :count).by(1)
task_comment = task.comments.last_created
expect(task_comment.task).to eq task
expect(task_comment.author).to eq author
@@ -245,10 +245,10 @@
"L'échéance de la tâche a été modifiée de 01/10/2019 à 02/10/2019."
end
it "should not create comment if date not changed" do
expect {
- task.create_term_changed_comment!(previous: Date.new(2019, 10, 2), author: author)
+ task.create_term_changed_comment!(previous: Date.new(2019, 10, 2), author:)
}.to_not change(Dorsale::Flyboy::TaskComment, :count)
end
end # describe "#create_term_changed_comment!"
end