2009-05-22 23:14:40 +02:00
|
|
|
Given /^public signups are turned (.*)$/ do |state|
|
2012-02-03 15:57:23 +01:00
|
|
|
case state
|
2009-05-22 23:14:40 +02:00
|
|
|
when 'on'
|
|
|
|
|
SITE_CONFIG['open_signups'] = true
|
|
|
|
|
when 'off'
|
|
|
|
|
SITE_CONFIG['open_signups'] = false
|
|
|
|
|
else
|
|
|
|
|
raise "public signups should be either 'on' or 'off'"
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
When /^I submit the signup form with username "([^\"]*)", password "([^\"]*)" and confirm with "([^\"]*)"$/ do |username, password, confirm|
|
|
|
|
|
fill_in 'Desired login', :with => username
|
|
|
|
|
fill_in 'Choose password', :with => password
|
|
|
|
|
fill_in 'Confirm password', :with => confirm
|
2012-02-03 15:57:23 +01:00
|
|
|
click_button "Signup"
|
2009-05-22 23:14:40 +02:00
|
|
|
end
|