Commit Graph

42 Commits

Author SHA1 Message Date
Daniel O'Connor
d1f754a288 Rubocop 2022-11-08 00:23:38 +10:30
Brenda
17f5b1c562 Routes using slugs (instead of ids)
this seems to be intended by the models having slugs (added about 7 years ago) but the routes weren't using them
2020-01-10 16:50:52 +13:00
Brenda
7257b2ada1 Update with frozen literals 2020-01-10 16:50:52 +13:00
Awesome Code
490db7b342 Auto corrected by following Lint Ruby RSpec/HookArgument 2019-02-11 09:00:34 +13:00
Awesome Code
284bb81bbf Auto corrected by following Lint Ruby RSpecEmptyLine 2019-02-09 03:05:40 +00:00
Brenda Wallace
550860178e Merge remote-tracking branch 'upstream/dev' into upgrade/rails-5 2018-09-11 16:07:30 +12:00
Awesome Code
90f4db4853 Auto corrected by following Ruby rspec layout 2018-09-10 22:20:12 +00:00
Brenda Wallace
59cca1b8cb Upgraded controller specs for rails 5 2018-04-02 16:18:46 +12:00
Brenda Wallace
65b4c7dbc1 Revert "Auto corrected by following Style/StringLiterals"
This reverts commit ab56a3c6b3.
2018-02-09 07:58:47 +13:00
Awesome Code
ab56a3c6b3 Auto corrected by following Style/StringLiterals 2018-02-07 10:20:26 +13:00
Brenda Wallace
16ad5384d1 Moved gardens chart to dedicated controller 2018-01-23 09:00:34 +13:00
Brenda Wallace
9db4736229 Permissions (and specs) for charts json 2018-01-23 09:00:34 +13:00
Awesome Code
dea7ce241b Auto corrected by following RSpec/EmptyLineAfterFinalLet 2018-01-23 09:00:34 +13:00
Brenda Wallace
d9bdc46099 Merge remote-tracking branch 'upstream/dev' into upgrade/rails-5
Conflicts:
	app/assets/javascripts/members.js.erb
2018-01-21 21:20:43 +13:00
Brenda Wallace
3a4443a4fe Permissions (and specs) for charts json 2018-01-13 22:15:27 +13:00
Brenda Wallace
8e0b7d9ded Merge branch 'charts' into upgrade/rails-5
Conflicts:
	app/assets/javascripts/crops.js.erb
	spec/controllers/comments_controller_spec.rb
	spec/controllers/harvests_controller_spec.rb
	spec/controllers/photos_controller_spec.rb
	spec/controllers/plantings_controller_spec.rb
	spec/models/post_spec.rb
	spec/views/home/_crops.html.haml_spec.rb
2018-01-11 08:34:20 +13:00
Awesome Code
e46f530dc3 Auto corrected by following RSpec/EmptyLineAfterFinalLet 2018-01-09 02:00:40 +00:00
Brenda Wallace
462654f26e Fixed gardens controller specs 2018-01-06 08:51:11 +13:00
Brenda Wallace
2f9610a60f Http positional arguments in rails 5 2018-01-04 21:28:48 +13:00
milesgould
bb6e9e32e6 De-deprecate controller and view specs
We deprecated controller and view specs on the grounds that they were
brittle, and were a poorer measure of user experience than feature
specs. However, feature specs have their own problems: they're much
slower to run, and flakier (see #901). We also ran into a few cases
where feature specs erroneously passed because they were checking for
the presence of a string that occurred in the error page!

Hence, we're cautiously un-deprecating controller and view specs.

Fixes #1132
2017-11-24 19:02:54 +13:00
milesgould
d8bf8ae4df De-deprecate controller and view specs
We deprecated controller and view specs on the grounds that they were
brittle, and were a poorer measure of user experience than feature
specs. However, feature specs have their own problems: they're much
slower to run, and flakier (see #901). We also ran into a few cases
where feature specs erroneously passed because they were checking for
the presence of a string that occurred in the error page!

Hence, we're cautiously un-deprecating controller and view specs.

Fixes #1132
2017-11-17 16:51:24 +00:00
Logan Gingerich
10a8df47a9 Factorygirl to factorybot - fixes #1413 (#1425)
* FactoryGirl Changed to FactoryBot

file fix

changes based on comments received

Bundle Update on 2017-10-29

style update to align hash literal

added package-lock

* indentation fixes with rubocop

* name added to contributors
2017-11-01 15:03:31 +00:00
Brenda Wallace
ab75f830fb Controller garden specs for member doing what they shouldn't 2016-12-25 10:38:07 +13:00
Brenda Wallace
723ebff923 Spacing fixes 2016-11-26 12:13:17 +13:00
Brenda Wallace
62e7c716dd Removed extra empty blank lines 2016-11-26 12:06:02 +13:00
Brenda Wallace
bdb057ca0f Removed all trailing white space 2016-11-14 15:05:32 +13:00
Daniel O'Connor
4b4e0cf69a $ rubocop --only HashSyntax --auto-correct
483 files inspected, 2018 offenses detected, 2018 offenses corrected
2016-05-19 15:53:11 -04:00
Taylor Griffin
95974ab21b add deprecation not to all controller and view specs 2015-02-12 19:52:53 +11:00
Taylor Griffin
7fc886f43c implement custom Sweeper class as stop gap against errors when running specs 2014-11-16 12:01:27 +11:00
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
gnattery
349aecbb69 Delete gardens 2013-03-20 12:30:38 +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
Skud
8da9a13eae Changed garden.member_id to garden.owner_id 2013-01-13 21:29: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
Miles Gould
bf58ff22a6 Give each user a default garden, called "Garden"
- created by an after_create callback on the user object
 - added test on model object
 - changed test of GET /gardens to expect Garden.all
2012-12-11 15:50:28 +00:00
Skud
760cf03b2c Fixed tests by getting rid of valid_session 2012-11-26 19:04:43 +11:00
Norman Ancajas
b39ee792b4 give each user a garden. note: tests broken! 2012-11-05 14:29:04 +08:00
Norman Ancajas
77c2e83c64 wrote migration to add test users, fixed tests 2012-11-05 13:03:19 +08:00
Norman Ancajas
f89815b6b3 added gardens table 2012-11-05 11:45:56 +08:00