summaryrefslogtreecommitdiff
path: root/users/test/support/integration_test_helper.rb
blob: 51e47c66f8fd18e5ba44f01ecb712b0cb7dbaad3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
module IntegrationTestHelper
  def submit_signup(username = nil, password = nil)
    username ||= "test_#{SecureRandom.urlsafe_base64}".downcase
    password ||= SecureRandom.base64
    visit '/users/new'
    fill_in 'Username', with: username
    fill_in 'Password', with: password
    fill_in 'Password confirmation', with: password
    click_on 'Sign Up'
    return username, password
  end
end