diff --git a/features/oauth.feature b/features/oauth.feature index c04a22bdd..07218f9d4 100644 --- a/features/oauth.feature +++ b/features/oauth.feature @@ -26,6 +26,7 @@ Feature: oauth And I should have 1 user on Chubbies Scenario: Signing up as a user while someone else is logged into Diaspora + When I change the app_host to Diaspora Given a user with username "alice" When I sign in as "alice@alice.alice" Then I visit "/new" on Chubbies @@ -55,6 +56,7 @@ Feature: oauth Given Chubbies is registered on my pod When I try to authorize Chubbies And I visit "/reset" on Chubbies + And I change the app_host to Diaspora And I go to the destroy user session page When I try to authorize Chubbies @@ -70,6 +72,7 @@ Feature: oauth When I press "Authorize" + And I change the app_host to Diaspora And I am on the authorizations page Then I should see "Chubbies" And I should see "The best way to chub." @@ -79,6 +82,7 @@ Feature: oauth When I press "Authorize" + And I change the app_host to Diaspora And I am on the authorizations page And I preemptively confirm the alert And I follow "Revoke Access" diff --git a/features/step_definitions/debug_steps.rb b/features/step_definitions/debug_steps.rb index 8527c6008..2105bdab2 100644 --- a/features/step_definitions/debug_steps.rb +++ b/features/step_definitions/debug_steps.rb @@ -1,4 +1,5 @@ When 'I debug' do + require 'ruby-debug' debugger true end diff --git a/features/step_definitions/oauth_steps.rb b/features/step_definitions/oauth_steps.rb index 6d5e94e62..8d367cf2c 100644 --- a/features/step_definitions/oauth_steps.rb +++ b/features/step_definitions/oauth_steps.rb @@ -56,10 +56,12 @@ And /^I should have (\d) user on Chubbies$/ do |num| end When /^I visit "([^"]+)" on Chubbies$/ do |path| - former_host = Capybara.app_host - Capybara.app_host = "localhost:#{Chubbies::PORT}" + Capybara.app_host = "http://localhost:#{Chubbies::PORT}" visit(path) - Capybara.app_host = former_host +end + +When /^I change the app_host to Diaspora$/ do + Capybara.app_host = "http://localhost:9887" end class Chubbies @@ -114,3 +116,4 @@ class Chubbies end end end +