diff options
author | azul <azul@riseup.net> | 2017-03-20 10:21:56 +0000 |
---|---|---|
committer | azul <azul@riseup.net> | 2017-03-20 10:21:56 +0000 |
commit | 3fd52ccca46310c32ecfabb69b41630cb41dca7e (patch) | |
tree | 897a279db2be8dcebe77f45b84b8d9c500766a7d /test/integration/regression/key_discovery_test.rb | |
parent | 15de288c3ca9bacc3d45675878ee7b8a2d9fc935 (diff) | |
parent | a741152e33f6a681113818418ad0f898f2d04697 (diff) |
Merge branch 'bugfix/404-for-missing-info' into 'master'
fix: 404 for missing pages template - fixes #9
Closes #9
See merge request !19
Diffstat (limited to 'test/integration/regression/key_discovery_test.rb')
-rw-r--r-- | test/integration/regression/key_discovery_test.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/integration/regression/key_discovery_test.rb b/test/integration/regression/key_discovery_test.rb new file mode 100644 index 0000000..2a38a78 --- /dev/null +++ b/test/integration/regression/key_discovery_test.rb @@ -0,0 +1,23 @@ +require 'test_helper' + +# This is not really a browser test - key discovery is used from bitmask. +# However we need to make sure to test the full rack stack to replicate +# exception handling. +class KeyDiscoveryTest < RackStackTest + include Capybara::DSL + + setup do + # make sure we test the whole stack... + Capybara.current_driver = Capybara.javascript_driver + end + + teardown do + # Revert Capybara.current_driver to Capybara.default_driver + Capybara.use_default_driver + end + + def test_404_on_non_existing_user + visit '/key/asjkholifweatg' + assert_equal 404, status_code + end +end |