Commit Graph

417 Commits

Author SHA1 Message Date
Brenda Wallace
b8ea6116d4 Add photos to plantings to make them interesting in the spec 2017-03-29 10:46:15 +13:00
Brenda Wallace
2521e52d71 Remove test called to Planting.interesting(...)
Interesting plantings with no photos is not used in the code.
The method was converted to a scope.
2017-03-29 08:28:58 +13:00
Brenda Wallace
322f28eaa6 bugfix in some spec expectations 2017-03-05 00:36:10 +13:00
Brenda Wallace
4eda3a506b Fix up csv importer, should make duplicates
Now matches the old functionality.
2017-02-24 20:08:01 +13:00
Brenda Wallace
5abc1fb80e duplicate alt name spec (and adding to crop) 2017-02-23 15:35:29 +13:00
Brenda Wallace
0a840abc58 Added specs for duplicate sci names 2017-02-23 15:35:29 +13:00
Brenda Wallace
968e9bd3ad Rubocop fix up in spec 2017-02-23 15:35:29 +13:00
Brenda Wallace
ddd0e0c285 Fixed typo in string causing spec to fail 2017-02-23 15:35:29 +13:00
Brenda Wallace
00952d5ef6 Updating more specs for new csv importer interface 2017-02-23 15:35:29 +13:00
Brenda Wallace
a0e1d8b11d Update scientific name model spec 2017-02-23 15:35:29 +13:00
Brenda Wallace
3d7f2ec20c Updating specs to match new csv importer 2017-02-23 15:35:29 +13:00
Brenda Wallace
2f9961651f Call new csv importer from specs 2017-02-23 15:35:29 +13:00
Shiny
b8884beb2f Merge branch 'dev' into test_runners 2017-02-21 11:31:02 +13:00
Brenda Wallace
50624fb2cb Style/MultilineBlockLayout fix 2017-02-19 16:17:03 +13:00
Brenda Wallace
e184503caa Fix up to match rubocop's MultilineMethodCallBraceLayout recommendation 2017-02-19 16:17:03 +13:00
Miles Gould
9030e5b978 Merge branch 'dev' into test_runners 2017-02-16 13:31:39 +00:00
Brenda Wallace
a46b8ebe76 Fix up all UnneededInterpolation 2017-02-16 12:26:47 +13:00
Miles Gould
b8c0882642 Tag ElasticSearch-related tests 2017-02-07 14:27:14 +00:00
Brenda Wallace
1dc44c9edc Filled in the 3 pending planting specs 2017-02-07 18:29:10 +13:00
Brenda Wallace
8408fdc845 Moved popular plant plarts calculation into sql 2017-02-06 13:22:18 +13:00
Brenda Wallace
ff50ec65d0 Merge remote-tracking branch 'upstream/dev' into HEAD 2017-01-22 18:26:29 +13:00
Brenda Wallace
0fa9f54c9c Rename member.has_role? to role? 2017-01-14 20:54:43 +13:00
Brenda Wallace
f214f608ff Rename member.is_paid? to paid? 2017-01-14 20:51:22 +13:00
Miles Gould
4b1cdc5650 Test Model.newsletter_(un)subscribe
I'm not very happy with this change as-is. The tests are very shallow
(they wouldn't have caught the bug @tconquest and I found in this code,
for instance), and use the deprecated `receive_message_chain` method.
From the RSpec docs:

"Chains can be arbitrarily long, which makes it quite painless to
violate the Law of Demeter in violent ways, so you should consider any
use of receive_message_chain a code smell.  Even though not all code
smells indicate real problems (think fluent interfaces),
receive_message_chain still results in brittle examples. For example, if
you write allow(foo).to receive_message_chain(:bar, :baz => 37) in a
spec and then the implementation calls foo.baz.bar, the stub will not
work."

Further work needed.
2016-12-19 22:15:53 +00:00
Miles Gould
4f1c94bfb9 Fix warnings in member_spec 2016-12-19 20:44:18 +00:00
Miles Gould
70f589d59b Replace instance vars with locals in member_spec 2016-12-19 20:33:43 +00:00
Miles Gould
f5eede6072 Improve tests for Member.interesting 2016-12-19 20:29:05 +00:00
Miles Gould
abb9acd04a post_spec: fix warnings
Several "unused variable" warnings (due to replacing unused instance
variables with unused locals) and one warning about ambiguous
lack-of-brackets.
2016-12-19 16:40:05 +00:00
Miles Gould
67faa5554c post_spec: replace instance vars with local vars
The @ in front of a variable makes it an instance variable of the
surrounding object. There's no point doing that for variables that are
only used in a single function, so I've made such variables in the file
post_spec.rb into function-local variables. We should do this more
generally: there are a lot of instances of this (anti?)pattern in our
test suite.
2016-12-19 16:36:46 +00:00
Miles Gould
59b86c9b0c Replace << with string-interpolation in post_spec 2016-12-19 16:33:41 +00:00
Miles Gould
7239cf068b Test [member name](member) mention syntax 2016-12-19 16:31:32 +00:00
Miles Gould
c23e80b56d Test Post.recently_active 2016-12-19 16:26:17 +00:00
Miles Gould
b011fc9bae Test Post.comment_count 2016-12-19 16:17:31 +00:00
Miles Gould
b40974d4c3 Test Crop.create_from_csv with missing parent
I couldn't work out how to test that the error is logged.
2016-12-19 16:15:19 +00:00
Daniel O'Connor
ce9fc85d0b Rubocop 2016-12-09 12:04:13 +10:30
Daniel O'Connor
fef272e30f Merge remote-tracking branch 'upstream/dev' into likeable 2016-12-09 11:42:32 +10:30
Brenda Wallace
464c570d99 Fixed parentheses that are interp-ed as grouped expression 2016-12-06 21:23:55 +13:00
Shiny
bb0eb25dd3 Merge branch 'dev' into bw/useless-assignments 2016-12-02 14:04:30 +13:00
Shiny
b454132cae Merge branch 'dev' into bw/useless-assignments 2016-12-01 12:51:13 +13:00
Shiny
771e6b649c Merge branch 'dev' into photo_concern 2016-12-01 12:37:23 +13:00
Mackenzie Morgan
77b7969fc9 DRY up photo & model interaction
* move stuff in models into a concern
 * create combined collection for all models that have photos
2016-11-30 00:46:58 -05:00
Brenda Wallace
a2e86b3e5e Rails dynamic finds fixed 2016-11-30 12:21:27 +13:00
Brenda Wallace
178c181cf5 Merge remote-tracking branch 'upstream/dev' into bw/useless-assignments
Conflicts:
	app/controllers/crops_controller.rb
	app/models/crop.rb
	spec/models/scientific_name_spec.rb
2016-11-30 10:32:02 +13:00
Mackenzie Morgan
72877aebaf update test for renamed scope 2016-11-29 13:41:05 -05:00
Mackenzie Morgan
53849a26e5 merge 2016-11-29 12:11:52 -05:00
Mackenzie Morgan
c93fd78aa8 Merge branch 'dev' of gitmaco:Growstuff/growstuff into scopify 2016-11-29 09:58:02 -05:00
Mackenzie Morgan
832719b01a merge from upstream dev 2016-11-29 09:37:25 -05:00
Mackenzie Morgan
fe860aa1ab clean up some tests 2016-11-28 22:33:00 -05:00
Mackenzie Morgan
e1a2b168c9 rename scientific_names.scientific_name to scientific_names.name
this mirrors alternate_names.name and allows making code more DRY
2016-11-28 21:57:51 -05:00
Brenda Wallace
8763c22284 Merge remote-tracking branch 'upstream/dev' into bw/indentation-for-great-glory
Conflicts:
	app/models/crop.rb
2016-11-29 02:33:30 +00:00