14 Commits

Author SHA1 Message Date
Skud
1ff2211c0f removed boring tests from controllers
the tests generated by 'rails g scaffold...' are boring and brittle.
they don't actually test anything other than the rails framework, and
they were causing us all kinds of trouble. we've started to blow them
away (and raised a PT chore to remove them from other controllers in due
course).
2013-07-08 13:09:37 +10:00
Skud
ec80b01c7a cleaning up tests on postgres
- still trying to make sure we explicitly use a real member, not just
assume there's one with id = 1

- also it looks like the tests for post activity are passing for obscure
reasons on sqlite when they shouldn't be. this is a known bug
(https://www.pivotaltracker.com/story/show/51280861) apparently
invisible to us under sqlite.
2013-07-08 12:18:51 +10:00
Skud
0508837303 Can't assume we have a member with id = 1
this works on sqlite but not on postgres (which we now test on, on
travis)
2013-07-08 12:00:45 +10:00
Skud
425a2b03fd Added RSS feed for comments on a single post 2013-05-24 13:43:06 +10:00
Craig Read
9c2fed461d Removed redundant @recent_posts instance variable
Not required, as we have pagination by default
2013-05-24 12:05:47 +10:00
Skud
10f8e363b1 two small improvements/bugfixes to post form
- fixed bug with "will be posted in /forums" when no forum specified
- changed wording of "what's happening..." when posting in forum
2013-03-20 22:25:15 +11:00
Skud
a0955d2bfc post in (or not in) a forum 2013-02-14 11:46:25 +11:00
Skud
e5d380729e we more or less have a settings page. doesn't WORK though. 2013-02-06 12:46:45 +11:00
Skud
21960a5494 Tried to get controller tests passing.
All are fine except for plantings.  I'm pretty sure hte problem is to do
with these two lines in app/model/ability.rb

  can :update, Planting, :garden => { :owner_id => member.id }
  can :destroy, Planting, :garden => { :owner_id => member.id }

I'm pretty sure that's the right syntax (according to
https://github.com/ryanb/cancan/wiki/Defining-Abilities) but since it's
the update and delete actions that are failing, I guess I must have it
wrong somehow.  Any hints?
2013-02-01 13:25:06 +11:00
Amy
0d84f0dde1 Added recent_plantings variable
Wrote tests for recent_plantings, recent_posts, new_crops
2013-01-28 19:30:23 -05:00
Skud
df76f2497a renamed Post.member_id to Post.author 2013-01-13 20:57:28 +11:00
Skud
edb59e07ee s/users/members/g -- all tests pass
There's still probably stuff broken, but this seemed like a good spot to
commit.  Sorry for the enormous chunk of code.  I was attempting to
update the views, but found that I needed to update a few things
elsewhere as well to make them work.
2013-01-13 18:33:43 +11:00
Skud
fdb309cdd2 s/users/members/g -- controllers and their tests 2013-01-13 17:53:24 +11:00
Skud
21f0f39bf9 Model and controller spec files pass.
Views are another matter (and will explode badly at this point)
2013-01-13 16:12:45 +11:00