removed unnecessary comments and fixed grammatical errors

This commit is contained in:
shlok007 2017-06-30 09:27:19 +05:30
parent 651abcab87
commit d59a036cf1
5 changed files with 7 additions and 12 deletions

View file

@ -3,8 +3,7 @@ require 'spec_helper'
feature 'Has correct abilities' do
let(:organization) { create(:organization) }
# It is necessary to use bang version of let to build roles before user
let(:conference) { create(:full_conference, organization: organization) } # user is cfp
let(:conference) { create(:full_conference, organization: organization) }
let(:role_cfp) { Role.find_by(name: 'cfp', resource: conference) }
let(:user_cfp) { create(:user, role_ids: [role_cfp.id]) }

View file

@ -3,11 +3,8 @@ require 'spec_helper'
feature 'Has correct abilities' do
let(:organization) { create(:organization) }
# It is necessary to use bang version of let to build roles before user
let(:conference) { create(:full_conference, organization: organization) } # user is info_desk
let(:conference) { create(:full_conference, organization: organization) }
let(:role_info_desk) { Role.find_by(name: 'info_desk', resource: conference) }
let(:user_info_desk) { create(:user, role_ids: [role_info_desk.id]) }
context 'when user is info desk' do

View file

@ -2,7 +2,7 @@ require 'spec_helper'
feature 'Has correct abilities' do
let(:organization) { create(:organization) }
let(:conference) { create(:full_conference, organization: organization) } # user is organization_admin
let(:conference) { create(:full_conference, organization: organization) }
let(:role_organization_admin) { Role.find_by(name: 'organization_admin', resource: organization) }
let(:user_organization_admin) { create(:user, role_ids: [role_organization_admin.id]) }

View file

@ -6,7 +6,7 @@ feature Organization do
let(:organization_admin) { create(:user, role_ids: [organization_admin_role.id]) }
let(:admin_user) { create(:admin) }
shared_examples 'successfully updates a organization' do
shared_examples 'successfully updates an organization' do
scenario 'updates a exsisting organization', feature: true, js: true do
visit edit_admin_organization_path(organization)
fill_in 'organization_name', with: 'changed name'
@ -33,7 +33,7 @@ feature Organization do
expect(Organization.last.name).to eq('Organization name')
end
it_behaves_like 'successfully updates a organization'
it_behaves_like 'successfully updates an organization'
end
context 'signed in as organization admin' do
@ -46,6 +46,6 @@ feature Organization do
expect(flash).to eq('You are not authorized to access this page.')
end
it_behaves_like 'successfully updates a organization'
it_behaves_like 'successfully updates an organization'
end
end

View file

@ -3,8 +3,7 @@ require 'spec_helper'
feature 'Has correct abilities' do
let(:organization) { create(:organization) }
# It is necessary to use bang version of let to build roles before user
let(:conference) { create(:full_conference, organization: organization) } # user is organizer
let(:conference) { create(:full_conference, organization: organization) }
let(:other_conference) { create(:conference, organization: organization) } # user is organizer, venue is not set by default
let(:role_organizer_conf) { Role.find_by(name: 'organizer', resource: conference) }
let(:role_organizer_other_conf) { Role.find_by(name: 'organizer', resource: other_conference) }