Merge pull request #479 from AyuntamientoMadrid/orgs-responsible

Orgs responsible
This commit is contained in:
Enrique García
2015-09-12 19:36:11 +02:00
23 changed files with 94 additions and 43 deletions

View File

@@ -9,6 +9,7 @@ feature 'Organizations' do
visit new_organization_registration_path
fill_in 'user_organization_attributes_name', with: 'Greenpeace'
fill_in 'user_organization_attributes_responsible_name', with: 'Dorothy Stowe'
fill_in 'user_email', with: 'green@peace.com'
fill_in 'user_password', with: 'greenpeace'
fill_in 'user_password_confirmation', with: 'greenpeace'

View File

@@ -2,6 +2,16 @@ require 'rails_helper'
feature 'Verification path' do
scenario "User is an organization" do
user = create(:user, verified_at: Time.now)
create(:organization, user: user)
login_as(user)
visit verification_path
expect(current_path).to eq account_path
end
scenario "User is verified" do
user = create(:user, verified_at: Time.now)