Fixing a test failure.
The intent of this test is to make sure that a floating User object without any storage returns false from canDelete() method. The earlier change made User.impersonate() to actually check if the user is a valid, so to make this test case work where it does "user.impersonate" and "user2.impersonate2", I'm creating valid accounts for these two users. Now what that means is that user2 is no longer a floating flyweight storage-less User, so it breaks the assumption of the "User should not be able to delete because he is not saved." assertion. To make this test case work, I'm introducing the 3rd user that is storage-less, and using it for the test.
Loading
Please register or sign in to comment