Closed thedod closed 9 years ago
This looks really cool! I added a couple of notes inline. Thanks :+1:
Thanks for the updates! Is there any chance you would be up for adding a unit test to https://github.com/kylewm/redwind/blob/master/tests/views_test.py ?
I haven't been good about them until now, but the project has gotten large enough that I can't refactor without them...at least not without breaking absolutely everything.
OK. I'll try to write something
passed the test, but I was "cheating" :smiling_imp:: Tag cloud counts a hidden post (firefly), and IIUC — it shouldn't.
Actually, hidden = True
just hides it from the front page stream; it's still part of everything (likes and bookmarks are "hidden" by default). Post.hidden shouldn't (IMO) be in the SQL statement at all.
That doesn't of course explain why it's not behaving as coded... Not sure.
Also 167 isn't covered.
I think we should have a draft post in the sillies, then logout and have tests that make sure it doesn't appear at /
,/tag
,/tag/sometag
Good point. I don't use drafts much yet (mostly because I don't have a way to update the published date when it goes from draft -> published, which is annoying) so it has been a little lower priority.
I don't have a way to update the published date when it goes from draft -> published
I'm not sure I understood that (and I'd like to, because I'm thinking of doing the "post-state-aware GUI" thing).
Regardless of drafts, there's one-time setup of doing a suite of tests while logged out. This could probably increase coverage significantly.
See https://github.com/kylewm/redwind/issues/18 for more discussion of drafts.
And I agree that tests should ideally check both logged in and logged out cases. It's not quite as simple as just running the tests while logged out, since they all have to be logged in initially to create the posts.
And I'm ready to merge this as soon as Post.hidden
is removed from the SQL. Thanks!
I think it's OK now. Something got mixed up in the diff view. Same pull request as before :wink: