@Test public void find_findsTaskInDatabase_true() { Task myTask = new Task("Mow the lawn", 1); myTask.save(); Task savedTask = Task.find(myTask.getId()); assertTrue(myTask.equals(savedTask)); }
@Test public void equals_returnsTrueIfDescriptionsAretheSame() { Task firstTask = new Task("Mow the lawn", 1); Task secondTask = new Task("Mow the lawn", 1); assertTrue(firstTask.equals(secondTask)); }