Added tests for emails views specs for addition of settings
This commit is contained in:
parent
5baeee9ee8
commit
b504db3372
3 changed files with 8 additions and 4 deletions
|
|
@ -7,8 +7,7 @@ class EmailSettings < ActiveRecord::Base
|
|||
:send_on_updated_conference_dates, :updated_conference_dates_subject,
|
||||
:updated_conference_dates_template, :send_on_updated_conference_registration_dates,
|
||||
:updated_conference_registration_dates_subject, :updated_conference_registration_dates_template,
|
||||
:send_on_venue_update,
|
||||
:venue_update_subject, :venue_update_template
|
||||
:send_on_venue_update, :venue_update_subject, :venue_update_template
|
||||
|
||||
def get_values(conference, user, event = nil)
|
||||
h = {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ FactoryGirl.define do
|
|||
updated_conference_dates_subject 'Conference dates have been updated'
|
||||
updated_conference_registration_dates_subject 'Conference registration dates have been updated'
|
||||
updated_conference_registration_dates_template 'Sample Conference\n New Dates: January 17 - 21 2014'
|
||||
send_on_venue_update true
|
||||
venue_update_subject "Venue has been updated"
|
||||
venue_update_template "Venue has been Updated to Sample Location"
|
||||
registration_subject 'Lorem Ipsum Dolsum'
|
||||
registration_email_template 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ describe 'admin/emails/index' do
|
|||
assign :settings, @settings
|
||||
render
|
||||
expect(rendered).
|
||||
to have_selector("input[type='checkbox'][value='1']", count: 6)
|
||||
to have_selector("input[type='checkbox'][value='1']", count: 7)
|
||||
expect(rendered).
|
||||
to have_selector("input[checked='checked'][type='checkbox'][value='1']", count: 3)
|
||||
to have_selector("input[checked='checked'][type='checkbox'][value='1']", count: 4)
|
||||
expect(rendered).to include('Lorem Ipsum Dolsum')
|
||||
expect(rendered).
|
||||
to include('Lorem ipsum dolor sit amet, consectetuer adipiscing elit')
|
||||
|
|
@ -18,5 +18,7 @@ describe 'admin/emails/index' do
|
|||
to include('Conference dates have been updated')
|
||||
expect(rendered).
|
||||
to include('Conference registration dates have been updated')
|
||||
expect(rendered).to include("Venue has been updated")
|
||||
expect(rendered).to include("Venue has been Updated to Sample Location")
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue