This project needs some tests.
Attached is a good start, but it definitely needs work. For example, five tests fail and I can't figure out why. Basically, the "Friends" tab isn't appearing on the users' pages. This means that any test that looks to 'user/%user/friends/*' fails.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | create_tests-1099756-4.patch | 10.44 KB | shawn dearmond |
| #3 | create_tests-1099756-3.patch | 11.92 KB | shawn dearmond |
| flag_friend_test.patch | 3.99 KB | shawn dearmond |
Comments
Comment #1
sirkitree commentedAgreed. I was thinking about this last night due to some of the basic things still being broken. Thank you for getting a start on these!
Comment #2
shawn dearmond commentedAha, my tests are failing because I didn't tell it to enable Views.
I'm going to break it into two tests. One that tests Views, and one that does not.
Comment #3
shawn dearmond commentedFully rewritten test file.
This one includes two tests: testAddAndRemoveFriends() and testDefaultViews().
There's also a public function called addFriendsAndRequests() which can be used to populate friendings and requests between three users. Both testAddAndRemoveFriends() and testDefaultViews() call this function.
Comment #4
shawn dearmond commentedBetter test file. I streamlined it by removing a bunch of duplicate tests. Now it doesn't take so long to run.
Comment #5
sirkitree commentedGreat! I think these should be pretty sufficient for now.
Once #1105682: "Deny" link should be on user page next to "Approve". is in we should extend the user cases to test for the Deny link as well. I'll put a not in that ticket about it though. Committing.
http://drupalcode.org/project/flag_friend.git/commitdiff/a86fcf23cd0b495...