mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Style/AlignHash fix
This commit is contained in:
parent
518e1cc62b
commit
cb810e58ce
3 changed files with 14 additions and 10 deletions
|
|
@ -80,6 +80,10 @@ Lint/UselessAssignment:
|
|||
Lint/Void:
|
||||
Enabled: true
|
||||
|
||||
# Align the elements of a hash literal if they span more than one line
|
||||
Style/AlignHash:
|
||||
Enabled: true
|
||||
|
||||
AllCops:
|
||||
Include:
|
||||
- '**/Rakefile'
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ describe Admin::ConferenceController do
|
|||
it 'changes conference attributes' do
|
||||
patch :update, id: conference.short_title, conference:
|
||||
attributes_for(:conference, title: 'Example Con',
|
||||
short_title: 'ExCon')
|
||||
short_title: 'ExCon')
|
||||
|
||||
conference.reload
|
||||
expect(conference.title).to eq('Example Con')
|
||||
|
|
@ -67,7 +67,7 @@ describe Admin::ConferenceController do
|
|||
it 'does not change conference attributes' do
|
||||
patch :update, id: conference.short_title, conference:
|
||||
attributes_for(:conference, title: 'Example Con',
|
||||
short_title: nil)
|
||||
short_title: nil)
|
||||
|
||||
conference.reload
|
||||
expect(flash[:alert]).
|
||||
|
|
@ -79,7 +79,7 @@ describe Admin::ConferenceController do
|
|||
it 're-renders the #show template' do
|
||||
patch :update, id: conference.short_title, conference:
|
||||
attributes_for(:conference, title: 'Example Con',
|
||||
short_title: nil)
|
||||
short_title: nil)
|
||||
|
||||
expect(flash[:alert]).
|
||||
to eq("Updating conference failed. Short title can't be blank.")
|
||||
|
|
@ -266,7 +266,7 @@ describe Admin::ConferenceController do
|
|||
describe 'PATCH #update' do
|
||||
it 'requires admin privileges' do
|
||||
patch :update, id: conference.short_title,
|
||||
conference: attributes_for(:conference,
|
||||
conference: attributes_for(:conference,
|
||||
short_title: 'ExCon')
|
||||
expect(response).to redirect_to(send(success_path))
|
||||
end
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ describe Campaign do
|
|||
describe '#url_parameters' do
|
||||
it 'returns the parameters in the correct format' do
|
||||
campaign = create(:campaign, utm_source: 'google+', utm_medium: 'advertisement',
|
||||
utm_term: 'opensource', utm_content: 'content', utm_campaign: '20percent')
|
||||
utm_term: 'opensource', utm_content: 'content', utm_campaign: '20percent')
|
||||
campaign.conference = create(:conference)
|
||||
|
||||
result = '?utm_source=google+&utm_medium=advertisement&utm_term=opensource&utm_content=content&utm_campaign=20percent'
|
||||
|
|
@ -32,17 +32,17 @@ describe Campaign do
|
|||
describe '#visits' do
|
||||
it 'returns one if there is one visit' do
|
||||
campaign = create(:campaign, utm_source: 'google+', utm_medium: 'advertisement',
|
||||
utm_term: 'opensource', utm_content: 'content', utm_campaign: '20percent')
|
||||
utm_term: 'opensource', utm_content: 'content', utm_campaign: '20percent')
|
||||
campaign.conference = build(:conference)
|
||||
|
||||
create(:visit, utm_source: 'google+', utm_medium: 'advertisement',
|
||||
utm_term: 'opensource', utm_content: 'content', utm_campaign: '20percent', started_at: Time.now)
|
||||
utm_term: 'opensource', utm_content: 'content', utm_campaign: '20percent', started_at: Time.now)
|
||||
expect(campaign.visits_count).to eq(1)
|
||||
end
|
||||
|
||||
it 'returns zero if there are no visits' do
|
||||
campaign = create(:campaign, utm_source: 'google+', utm_medium: 'advertisement',
|
||||
utm_term: 'opensource', utm_content: 'content', utm_campaign: '20percent')
|
||||
utm_term: 'opensource', utm_content: 'content', utm_campaign: '20percent')
|
||||
campaign.conference = create(:conference)
|
||||
|
||||
expect(campaign.visits_count).to eq(0)
|
||||
|
|
@ -52,7 +52,7 @@ describe Campaign do
|
|||
describe '#registrations' do
|
||||
it 'returns zero if there are no registration' do
|
||||
campaign = build(:campaign, utm_source: 'google+', utm_medium: 'advertisement',
|
||||
utm_term: 'opensource', utm_content: 'content', utm_campaign: '20percent')
|
||||
utm_term: 'opensource', utm_content: 'content', utm_campaign: '20percent')
|
||||
campaign.conference = build(:conference)
|
||||
|
||||
expect(campaign.registrations_count).to eq(0)
|
||||
|
|
@ -62,7 +62,7 @@ describe Campaign do
|
|||
describe '#submissions' do
|
||||
it 'returns zero if there are no submissions' do
|
||||
campaign = build(:campaign, utm_source: 'google+', utm_medium: 'advertisement',
|
||||
utm_term: 'opensource', utm_content: 'content', utm_campaign: '20percent')
|
||||
utm_term: 'opensource', utm_content: 'content', utm_campaign: '20percent')
|
||||
campaign.conference = build(:conference)
|
||||
|
||||
expect(campaign.submissions_count).to eq(0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue