summaryrefslogtreecommitdiff
path: root/users/test/integration/api/login_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'users/test/integration/api/login_test.rb')
-rw-r--r--users/test/integration/api/login_test.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/users/test/integration/api/login_test.rb b/users/test/integration/api/login_test.rb
new file mode 100644
index 0000000..ba82c8e
--- /dev/null
+++ b/users/test/integration/api/login_test.rb
@@ -0,0 +1,25 @@
+require 'test_helper'
+
+CONFIG_RU = (Rails.root + 'config.ru').to_s
+OUTER_APP = Rack::Builder.parse_file(CONFIG_RU).first
+
+class AccountFlowTest < ActiveSupport::TestCase
+ include Rack::Test::Methods
+ include Warden::Test::Helpers
+ include LeapWebCore::AssertResponses
+
+ def app
+ OUTER_APP
+ end
+
+ def setup
+ @login = "integration_test_user"
+ end
+
+ test "require json requests" do
+ put "http://api.lvh.me:3000/1/sessions/" + @login,
+ :client_auth => "This is not a valid login anyway"
+ assert_json_error login: I18n.t(:all_strategies_failed)
+ end
+
+end