Conference date update email notification completed

Added tests
This commit is contained in:
Gopesh Tulsyan 2014-07-08 15:42:35 +05:30
parent 75cf1123cf
commit 861c1af729
5 changed files with 24 additions and 5 deletions

View file

@ -6,6 +6,8 @@ FactoryGirl.define do
send_on_accepted false
send_on_rejected false
send_on_confirmed_without_registration false
send_on_updated_conference_dates true
updated_conference_dates_subject 'Conference dates have been updated'
registration_subject 'Lorem Ipsum Dolsum'
registration_email_template 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit'
end

View file

@ -1,19 +1,20 @@
require 'spec_helper'
describe 'admin/emails/index' do
it 'renders email templates' do
it 'renders email templates' do
@conference = create(:conference)
assign :conference, @conference
@settings = create(:email_settings)
assign :settings, @settings
render
expect(rendered).
to have_selector("input[type='checkbox'][value='1']", count: 4)
to have_selector("input[type='checkbox'][value='1']", count: 5)
expect(rendered).
to have_selector("input[checked='checked'][type='checkbox'][value='1']", count: 1)
to have_selector("input[checked='checked'][type='checkbox'][value='1']", count: 2)
expect(rendered).to include('Lorem Ipsum Dolsum')
expect(rendered).
to include('Lorem ipsum dolor sit amet, consectetuer adipiscing elit')
expect(rendered).
to include('Conference dates have been updated')
end
end