I think FlagTest should have more test. Tests that flag and unflag flags. More test would be great but can not come up with more right now.

I can write some test cases and attach a patch.

CommentFileSizeAuthor
#3 1717672.flag_.flag-unflag-tests.patch5.16 KBjoachim

Comments

joachim’s picture

Component: Miscellaneous » Flag core

That would be fantastic!

socketwench’s picture

Agreed. I'm surprised we don't have a test for that. I can try to write it; it'd certainly be a good learning experience for me!

joachim’s picture

Title: Add more test to FlagTest » Add flag/unflag tests to FlagTest
Status: Active » Fixed
StatusFileSize
new5.16 KB

Committed this patch (obviously all tests pass...)

See #616524: Add tests for Flag access for own/others' content for more tests that need writing! :D

socketwench’s picture

And I was just figuring out how to write that myself. >_<

joachim’s picture

Sorry!

Do feel free to add more stuff -- I'm sure there's other things we could be testing.

joachim’s picture

Actually, what would be really handy would be various other spots where flag access matters -- such as the two places that #1878808: remove $account parameter from flag_get_flags() will change.

socketwench’s picture

It's okay. If I thought I could figure it out in time, I could have assigned it to myself. The issue was still fair game. Besides, now I have your code to look at and learn from.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.