rubocop files update and auto correction
This commit is contained in:
parent
1a62dc930e
commit
1f82fbbdc6
88 changed files with 519 additions and 452 deletions
|
|
@ -1,7 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
feature Conference do
|
||||
|
||||
let!(:conference) { create(:conference) }
|
||||
let!(:organizer_role) { create(:organizer_role, resource: conference) }
|
||||
let!(:organizer) { create(:user, role_ids: [organizer_role.id]) }
|
||||
|
|
@ -17,14 +16,14 @@ feature Conference do
|
|||
click_button 'Create Call for paper'
|
||||
|
||||
expect(flash).
|
||||
to eq('Creating the call for papers failed. ' +
|
||||
to eq('Creating the call for papers failed. ' +
|
||||
"Start date can't be blank. End date can't be blank.")
|
||||
|
||||
today = Date.today - 1
|
||||
page.execute_script(
|
||||
"$('#conference-start-datepicker').val('#{today.strftime('%d/%m/%Y')}')")
|
||||
"$('#conference-start-datepicker').val('#{today.strftime('%d/%m/%Y')}')")
|
||||
page.execute_script(
|
||||
"$('#conference-end-datepicker').val('#{(today + 6).strftime('%d/%m/%Y')}')")
|
||||
"$('#conference-end-datepicker').val('#{(today + 6).strftime('%d/%m/%Y')}')")
|
||||
|
||||
fill_in 'call_for_paper_rating', with: '4'
|
||||
|
||||
|
|
@ -32,7 +31,7 @@ feature Conference do
|
|||
|
||||
# Validations
|
||||
expect(flash).
|
||||
to eq('Call for papers successfully created.')
|
||||
to eq('Call for papers successfully created.')
|
||||
expect(find('#start_date').text).to eq(today.strftime('%A, %B %-d. %Y'))
|
||||
expect(find('#end_date').text).to eq((today + 6).strftime('%A, %B %-d. %Y'))
|
||||
expect(find('#rating').text).to eq('4')
|
||||
|
|
@ -50,10 +49,10 @@ feature Conference do
|
|||
|
||||
# Validate update with empty start date will not saved
|
||||
page.execute_script(
|
||||
"$('#conference-start-datepicker').val('')")
|
||||
"$('#conference-start-datepicker').val('')")
|
||||
click_button 'Update Call for paper'
|
||||
expect(flash).
|
||||
to eq('Updating call for papers failed. ' +
|
||||
to eq('Updating call for papers failed. ' +
|
||||
"Start date can't be blank.")
|
||||
|
||||
# Fill in date
|
||||
|
|
@ -68,7 +67,7 @@ feature Conference do
|
|||
|
||||
# Validations
|
||||
expect(flash).
|
||||
to eq('Call for papers successfully updated.')
|
||||
to eq('Call for papers successfully updated.')
|
||||
expect(find('#start_date').text).to eq(today.strftime('%A, %B %-d. %Y'))
|
||||
expect(find('#end_date').text).to eq((today + 14).strftime('%A, %B %-d. %Y'))
|
||||
expect(find('#rating').text).to eq('0')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue