#2484: Fix test changing contexts. Why choose at random and occasionally fail when you can just pick useful fixtures?

This commit is contained in:
Jyri-Petteri Paloposki 2021-01-05 07:47:58 +02:00
parent 45f5c1d3a4
commit 7272f1c743

View file

@ -455,8 +455,8 @@ class TodosControllerTest < ActionController::TestCase
# called by dragging a todo to another context container
login_as(:admin_user)
todo = users(:admin_user).todos.active.first
context = users(:admin_user).contexts.first
todo = Todo.find(1)
context = Context.find(2)
refute_equal todo.context.id, context.id