Commit Graph

56 Commits

Author SHA1 Message Date
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
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
0e0af44d9f post show specs, use expect syntax, and more tests for js injection 2017-10-23 10:44:37 +01:00
Brenda Wallace
ae3752e021 DefWithParentheses fixup 2017-02-19 16:19:16 +13:00
Brenda Wallace
e184503caa Fix up to match rubocop's MultilineMethodCallBraceLayout recommendation 2017-02-19 16:17:03 +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
bbc19a5436 Array indentation fixed 2016-11-26 11:49:51 +13:00
Brenda Wallace
d268d2b09e Fixed indentation on comments 2016-11-26 11:45:25 +13:00
Brenda Wallace
c878baa886 Indented parameters cleanup 2016-11-26 11:41:07 +13:00
Brenda Wallace
564731667e Fixed up all remaining hash alignment 2016-11-26 11:17:42 +13:00
Brenda Wallace
83392ddda1 Indentation clean ups 2016-11-26 10:51:54 +13:00
Brenda Wallace
bdb057ca0f Removed all trailing white space 2016-11-14 15:05:32 +13:00
Daniel O'Connor
29765ebc19 rubocop --only HashSyntax --auto-correct 2016-08-22 19:02:27 +09:30
Daniel O'Connor
0620646c6d Fix failing specs
- Updated assert_select behaviour given this is now based on nokogiri
 - Adjust some specs not to look for a specific asset name, but a behaviour
 - Adjust some specs for HTML5 style attributes instead of xhtml style
 - Fix tests that did not render before
2016-06-10 16:01:30 +09:30
Cesy Avon
259c1e1731 Fix #476 show edited and posted date on posts and comments 2016-06-02 14:37:33 +00: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
cc31e864d5 update webrat and webrat matchers 2014-11-16 14:31:33 +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
2c8f0687e5 Added posts and comments RSS links 2013-10-23 12:06:04 +11:00
Skud
c12c0acc14 removed author fields from RSS 2013-08-05 12:23:36 +10:00
Skud
7c6d7ba3a9 rearranged routing to avoid ?owner_id=99 2013-07-26 15:29:30 +10:00
Skud
18b92b133b Added titles to comment items in RSS 2013-05-24 14:43: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
Craig Read
bc03a5c488 Converted Posts RSS to HAML 2013-05-24 11:58:40 +10:00
Miles Gould
c53dd6797f Show other comments on post when editing a comment. 2013-04-29 21:44:30 +01:00
Miles Gould
c9cc7be0d1 Refactor model code out of view in posts/show. 2013-03-28 10:57:30 +00:00
Miles Gould
bb1e8ede19 Fix misordered comments on post page bug.
https://www.pivotaltracker.com/story/show/46799417
2013-03-28 10:43:47 +00:00
Cesy Avon
c586990329 Merge branch 'paginate' of https://github.com/phazel/growstuff into dev
Conflicts:
	Gemfile.lock
2013-03-21 05:17:14 -07: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
17309723d5 show markdown help on post and comment pages 2013-03-20 22:08:09 +11:00
gnattery
ee42ebbf1b paginate posts 2013-03-20 15:27:54 +11:00
Miles Gould
8b47773b59 Clean up post view specs as per Skud's comments.
See
e470cf7358 (commitcomment-2732846)
2013-03-04 11:57:59 +00:00
Miles Gould
e470cf7358 Send "N comments" links to the comments anchors.
We have to call post.save in the posts/index specs, because post_path
fails unless the post has been persisted (and hence had its slug
generated). I think. That fixed the failing tests, anyway.
2013-02-27 15:39:42 +00:00
Miles Gould
e7a1beb323 Add anchor tag for comments in posts/show. 2013-02-27 13:26:35 +00:00
Miles Gould
ade199c17b Better links for posts.
- add Permalink
 - show Reply instead of "Comment" (iff you can comment)
 - Edit link shows if you have permission to edit
 - reorganised tests for post/_single
 - posts/_single now requires current_user; patch tests for comments.
2013-02-27 12:53:50 +00:00
Miles Gould
a1fcafc1a3 Give contexts in posts/single tests more descriptive names. 2013-02-27 11:59:39 +00:00
Jared McCorkindale
5f4d989cbd add read link to post single and comment link 2013-02-27 11:45:58 +00:00
Jared McCorkindale
67d89826f4 add link to comment value 2013-02-27 11:45:58 +00:00
Jared McCorkindale
1c1fac0aa5 hiding comment count from post show 2013-02-27 11:45:58 +00:00
Jared McCorkindale
cf678a45c4 add count of comments to posts partial 2013-02-27 11:44:02 +00:00
Joseph Caudle
9e29aec14a Merge branch 'dev' into unique_usernames
* dev: (28 commits)
  Upgrade bootstrap by running `rails g bootstrap:install`
  added .to_i to times to attempt to pass tests on travis
  stubbed Time.now to prevent test failures
  Added friendly IDs for forum and role
  General prettification and making it look nice.
  show forum name in post meta
  Added a rake task to create an admin user.
  hooked roles up to cancan
  Added roles, but haven't yet hooked them up to CanCan
  PT story 41985889, Hides 'new garden' tab on other member's pages
  Add forums to top nav
  Display posts in summary on forum page
  tests for markdown
  post in (or not in) a forum
  prettifying forum views
  added associations between forums, posts, and members
  rails g scaffold Forum
  Rearranging password fields
  Attempted rearranging settings page, broke something
  Upgrade to Rails 3.2.12, after *another* security flaw.
  ...

Conflicts:
	spec/models/member_spec.rb
2013-02-21 22:19:45 -05:00
Joseph Caudle
728f8ec9ce Update factory for members and specs about members
We have added a sequence for login_name which is similar to the one for
emails in which the member name is incremented each time a new member is
saved.

In addition, we have updated all specs which asked for an explicit
login_name of member1 to use a regex looking only for member and some
digit.
2013-02-21 21:57:39 -05:00
Skud
11fa06b56c show forum name in post meta 2013-02-20 14:54:38 +11:00
Skud
a0955d2bfc post in (or not in) a forum 2013-02-14 11:46:25 +11:00
Skud
660c626581 show comments on post page 2013-02-08 16:36:15 +11:00
Skud
ae59b1e18d pass post_id through to comment 2013-02-08 14:37:57 +11:00
Skud
f66b4a64a3 added comment button to posts 2013-02-08 14:22:49 +11:00