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

@ -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