summaryrefslogtreecommitdiff
path: root/tests/white-box
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-11-13 12:10:32 -0400
committerKali Kaneko <kali@leap.se>2015-11-13 12:11:10 -0400
commit9ca3e3ede5beb8763233063315cdb3d6bc15bc98 (patch)
tree908ff519abfc373337ae1b55d78acfd4d44511b6 /tests/white-box
parent7d0b6b25e49a1ccb70c4f502f7dfc58878b900cc (diff)
re-enable user creation and soledad-sync test
Diffstat (limited to 'tests/white-box')
-rw-r--r--tests/white-box/webapp.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/white-box/webapp.rb b/tests/white-box/webapp.rb
index 48507521..8be6bde2 100644
--- a/tests/white-box/webapp.rb
+++ b/tests/white-box/webapp.rb
@@ -41,6 +41,34 @@ class Webapp < LeapTest
pass
end
+ def test_05_Can_create_and_authenticate_and_delete_user_via_API?
+ if property('webapp.allow_registration')
+ assert_tmp_user
+ pass
+ else
+ skip "New user registrations are disabled."
+ end
+ end
+
+ def test_06_Can_sync_Soledad?
+ return unless property('webapp.allow_registration')
+ soledad_config = property('definition_files.soledad_service')
+ if soledad_config && !soledad_config.empty?
+ soledad_server = pick_soledad_server(soledad_config)
+ if soledad_server
+ assert_tmp_user do |user|
+ assert_user_db_exists(user)
+ command = File.expand_path "../../helpers/soledad_sync.py", __FILE__
+ soledad_url = "https://#{soledad_server}/user-#{user.id}"
+ assert_run "#{command} #{user.id} #{user.session_token} #{soledad_url}"
+ pass
+ end
+ end
+ else
+ skip 'No soledad service configuration'
+ end
+ end
+
private
def url_options