👋 update_attributes
You served us well...
This commit is contained in:
parent
ca80b753e7
commit
85dae98a76
46 changed files with 109 additions and 109 deletions
|
|
@ -35,7 +35,7 @@ feature 'Version' do
|
|||
end
|
||||
|
||||
scenario 'display changes in cfp', feature: true, versioning: true, js: true do
|
||||
cfp.update_attributes(start_date: (Time.zone.today + 1).strftime('%d/%m/%Y'), end_date: (Time.zone.today + 3).strftime('%d/%m/%Y'))
|
||||
cfp.update(start_date: (Time.zone.today + 1).strftime('%d/%m/%Y'), end_date: (Time.zone.today + 3).strftime('%d/%m/%Y'))
|
||||
cfp_id = cfp.id
|
||||
cfp.destroy
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ feature 'Version' do
|
|||
|
||||
scenario 'display changes in registration_period', feature: true, versioning: true, js: true do
|
||||
registration_period = create(:registration_period, conference: conference)
|
||||
registration_period.update_attributes(start_date: (Time.zone.today + 1).strftime('%d/%m/%Y'), end_date: (Time.zone.today + 3).strftime('%d/%m/%Y'))
|
||||
registration_period.update(start_date: (Time.zone.today + 1).strftime('%d/%m/%Y'), end_date: (Time.zone.today + 3).strftime('%d/%m/%Y'))
|
||||
registration_period_id = registration_period.id
|
||||
registration_period.destroy
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ feature 'Version' do
|
|||
scenario 'display changes in conference', feature: true, versioning: true, js: true do
|
||||
new_conference = create(:conference, title: 'Test Conference')
|
||||
organizer.add_role :organizer, new_conference
|
||||
new_conference.update_attributes(title: 'New Con', short_title: 'NewCon')
|
||||
new_conference.update(title: 'New Con', short_title: 'NewCon')
|
||||
|
||||
visit admin_revision_history_path
|
||||
select '100', from: 'versionstable_length'
|
||||
|
|
@ -72,7 +72,7 @@ feature 'Version' do
|
|||
|
||||
scenario 'display changes in event_type', feature: true, versioning: true, js: true do
|
||||
event_type = create(:event_type, program: conference.program, name: 'Discussion')
|
||||
event_type.update_attributes(length: 90, maximum_abstract_length: 10000)
|
||||
event_type.update(length: 90, maximum_abstract_length: 10000)
|
||||
event_type_id = event_type.id
|
||||
event_type.destroy
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ feature 'Version' do
|
|||
|
||||
scenario 'display changes in lodging', feature: true, versioning: true, js: true do
|
||||
lodging = create(:lodging, conference: conference, name: 'Hotel XYZ')
|
||||
lodging.update_attributes(description: 'Nice view,close to venue', website_link: 'http://www.example.com')
|
||||
lodging.update(description: 'Nice view,close to venue', website_link: 'http://www.example.com')
|
||||
lodging_id = lodging.id
|
||||
lodging.destroy
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ feature 'Version' do
|
|||
scenario 'display changes in room', feature: true, versioning: true, js: true do
|
||||
venue = create(:venue, conference: conference)
|
||||
room = create(:room, venue: venue, name: 'Auditorium')
|
||||
room.update_attributes(size: 120)
|
||||
room.update_attribute(:size, 120)
|
||||
room_id = room.id
|
||||
room.destroy
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ feature 'Version' do
|
|||
scenario 'display changes in sponsor', feature: true, versioning: true, js: true do
|
||||
conference.sponsorship_levels << create_list(:sponsorship_level, 2, conference: conference)
|
||||
sponsor = create(:sponsor, conference: conference, name: 'SUSE', sponsorship_level: conference.sponsorship_levels.first)
|
||||
sponsor.update_attributes(website_url: 'https://www.suse.com/company/history', sponsorship_level: conference.sponsorship_levels.second)
|
||||
sponsor.update(website_url: 'https://www.suse.com/company/history', sponsorship_level: conference.sponsorship_levels.second)
|
||||
sponsor.destroy
|
||||
sponsor_id = sponsor.id
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ feature 'Version' do
|
|||
|
||||
scenario 'display changes in sponsorship_level', feature: true, versioning: true, js: true do
|
||||
sponsorship_level = create(:sponsorship_level, conference: conference)
|
||||
sponsorship_level.update_attributes(title: 'Gold')
|
||||
sponsorship_level.update_attribute(:title, 'Gold')
|
||||
sponsorship_level_id = sponsorship_level.id
|
||||
sponsorship_level.destroy
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ feature 'Version' do
|
|||
|
||||
scenario 'display changes in ticket', feature: true, versioning: true, js: true do
|
||||
ticket = create(:ticket, conference: conference, title: 'Gold')
|
||||
ticket.update_attributes(price: 50, description: 'Premium Ticket')
|
||||
ticket.update(price: 50, description: 'Premium Ticket')
|
||||
ticket_id = ticket.id
|
||||
ticket.destroy
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ feature 'Version' do
|
|||
|
||||
scenario 'display changes in track', feature: true, versioning: true, js: true do
|
||||
track = create(:track, program: conference.program, name: 'Distribution')
|
||||
track.update_attributes(description: 'Events about Linux distributions')
|
||||
track.update_attribute(:description, 'Events about Linux distributions')
|
||||
track_id = track.id
|
||||
track.destroy
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ feature 'Version' do
|
|||
|
||||
scenario 'display changes in venue', feature: true, versioning: true, js: true do
|
||||
venue = create(:venue, conference: conference, name: 'Example University')
|
||||
venue.update_attributes(website: 'www.example.com new', description: 'Just another beautiful venue')
|
||||
venue.update(website: 'www.example.com new', description: 'Just another beautiful venue')
|
||||
venue_id = venue.id
|
||||
venue.destroy
|
||||
|
||||
|
|
@ -221,7 +221,7 @@ feature 'Version' do
|
|||
|
||||
scenario 'display changes in difficulty levels', feature: true, versioning: true, js: true do
|
||||
difficulty_level = create(:difficulty_level, program: conference.program, title: 'Expert')
|
||||
difficulty_level.update_attributes(description: 'Only for Experts')
|
||||
difficulty_level.update_attribute(:description, 'Only for Experts')
|
||||
difficulty_level_id = difficulty_level.id
|
||||
difficulty_level.destroy
|
||||
|
||||
|
|
@ -273,7 +273,7 @@ feature 'Version' do
|
|||
|
||||
scenario 'display changes in conference commercials', feature: true, versioning: true, js: true do
|
||||
conference_commercial = create(:conference_commercial, commercialable: conference)
|
||||
conference_commercial.update_attributes(url: 'https://www.youtube.com/watch?v=VNkDJk5_9eU')
|
||||
conference_commercial.update_attribute(:url, 'https://www.youtube.com/watch?v=VNkDJk5_9eU')
|
||||
conference_commercial.destroy
|
||||
|
||||
visit admin_revision_history_path
|
||||
|
|
@ -284,7 +284,7 @@ feature 'Version' do
|
|||
|
||||
scenario 'display changes in event commercials', feature: true, versioning: true, js: true do
|
||||
event_commercial
|
||||
event_commercial.update_attributes(url: 'https://www.youtube.com/watch?v=VNkDJk5_9eU')
|
||||
event_commercial.update_attribute(:url, 'https://www.youtube.com/watch?v=VNkDJk5_9eU')
|
||||
event_commercial.destroy
|
||||
|
||||
visit admin_revision_history_path
|
||||
|
|
@ -354,7 +354,7 @@ feature 'Version' do
|
|||
end
|
||||
|
||||
scenario 'display changes in email settings', feature: true, versioning: true, js: true do
|
||||
conference.email_settings.update_attributes(registration_subject: 'xxxxx', registration_body: 'yyyyy', accepted_subject: 'zzzzz')
|
||||
conference.email_settings.update(registration_subject: 'xxxxx', registration_body: 'yyyyy', accepted_subject: 'zzzzz')
|
||||
|
||||
visit admin_revision_history_path
|
||||
expect(page).to have_text("Someone (probably via the console) updated registration body, registration subject and accepted subject of email settings in conference #{conference.short_title}")
|
||||
|
|
@ -374,7 +374,7 @@ feature 'Version' do
|
|||
registration = Registration.create(user: organizer, conference: conference)
|
||||
event = create(:event, program: conference.program, title: 'My second event')
|
||||
EventsRegistration.create(registration: registration, event: event)
|
||||
EventsRegistration.first.update_attributes(attended: true)
|
||||
EventsRegistration.first.update_attribute(:attended, true)
|
||||
EventsRegistration.last.destroy
|
||||
# Here registration is deleted to ensure the event registration related change still displays the associated user's name
|
||||
registration.destroy
|
||||
|
|
@ -433,7 +433,7 @@ feature 'Version' do
|
|||
|
||||
scenario 'display updates to user', feature: true, versioning: true, js: true do
|
||||
user = create(:user)
|
||||
user.update_attributes(nickname: 'testnick', affiliation: 'openSUSE')
|
||||
user.update(nickname: 'testnick', affiliation: 'openSUSE')
|
||||
|
||||
visit admin_revision_history_path
|
||||
expect(page).to have_text("Someone (probably via the console) updated nickname and affiliation of user #{user.name}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue