Commit Graph

13 Commits

Author SHA1 Message Date
Joseph Mastey 9902345291 chore(rubocop): giganto rubocop commit.
muahahahah
2017-12-05 18:46:21 -06:00
cktricky 3322441ba4 whoops. Good catch @jmmastey 2017-09-19 11:38:03 -04:00
mccabe615 7e11dee133 trying to fix the broken specs. still doesn't pass but it may be due to changes in capybara 2015-11-22 14:55:54 -05:00
chrismo 73e8ab972b assign_user_id and UserFixture password fixes.
When the database is empty, which can happen in the test database and in
the dev database if the seeds.rb aren't applied, the assign_user_id
method would not assign an id and the newer before_filter block to
generate_token would fail.

UserFixture had a password on it that wouldn't pass the new validation
rules once that vulnerability is patched.
2015-01-06 13:21:45 -05:00
Al Snow bdc529972d Increase Poltergeist timeout to 60; Rebuild Gemfile.lock file 2014-03-15 12:49:42 -04:00
James Espinosa 69078aa404 Add minor text and typo changes 2013-11-14 15:04:45 -06:00
mccabe615 032581b3da Merge pull request #64 from jasnow/master
Rebuilt Gemfile.lock file. Fixed test by using "$" instead of "@@"
2013-11-12 12:06:47 -08:00
Mike McCabe f8fbc93c75 adding fix for phantomjs errors on mavericks *crossing fingers* 2013-11-12 14:21:32 -05:00
Al Snow 98ccf0bd41 Rebuilt Gemfile.lock file; Changed "@@" (class var) to "$" (global var) in spec/support/capybara_shared.rb 2013-10-28 19:45:42 -04:00
Mike McCabe e999c02506 adding password hashing spec 2013-10-09 12:55:00 -04:00
chrismo 525dfa1717 Added notice and removed spoilers from spec names. 2013-10-03 11:00:43 -05:00
chrismo 911a52ee83 Add pending code to flip-flop results of specs.
This isn't the cleanest approach, but should be good for now.

Obviously, there are two contexts for these specs: one is from the
maintainer's standpoint, the other is from the trainee who is using
RailsGoat for training.

The maintainer wants all of these specs to pass, to ensure the
vulnerabilities are still functional as vulnerabilities.

The trainee could potentially use these specs (though reading the specs
contains spoilers) to track and verify their fixes.

I've wired in a pending block around each assertion that checks a method
to see what the result of the pending call would be. You can see
examples of how this works with conditions here:
https://www.relishapp.com/rspec/rspec-core/v/2-14/docs/pending/pending-examples

This means these specs will all fail now by default (the trainee
context), but will pass, when vulnerable, if the RAILSGOAT_MAINTAINER
env var is set.

The only flaw at the moment is that in the trainee context, fixing the
vulnerabilities will result in the specs going from failing to
_pending_, not passing (which makes sense, given how we're using RSpec's
pending functionality).

Maybe it'd be simpler/better to have a boolean toggle of our own somehow
wrap the assertions in blocks to do explicitly what we want (flip-flop
the result based on the context).
2013-10-01 23:26:28 -05:00
chrismo 269d5a0075 XSS Capybara spec added. 2013-09-27 16:58:33 -05:00