Skip to content

Instantly share code, notes, and snippets.

@ipolevoy
Created May 31, 2015 15:40
Show Gist options
  • Save ipolevoy/821e986c5c7deb28a90d to your computer and use it in GitHub Desktop.
Save ipolevoy/821e986c5c7deb28a90d to your computer and use it in GitHub Desktop.
@Test
public void shouldDeleteOnePatient(){
deleteAndPopulateTables("doctors", "patients", "doctors_patients");
Doctor doctor = Doctor.findById(1);
List<Patient> patients = doctor.getAll(Patient.class);
a(2).shouldBeEqual(patients.size());
doctor.remove(patients.get(0));
patients = doctor.getAll(Patient.class);
a(1).shouldBeEqual(patients.size());
}
@rivella50
Copy link

Not anymore!
I will try to create a test class which should demonstrate what is not working correctly.
I'll post the code here when i'm ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment