osem-fcy/spec/views/admin/emails/index.html.haml_spec.rb

25 lines
925 B
Ruby
Raw Normal View History

require 'spec_helper'
2014-05-19 12:49:04 +05:30
describe 'admin/emails/index' do
2014-05-22 18:19:07 +02:00
it 'renders email templates' do
@conference = create(:conference)
assign :conference, @conference
@settings = create(:email_settings)
assign :settings, @settings
render
2014-05-19 12:49:04 +05:30
expect(rendered).
to have_selector("input[type='checkbox'][value='1']", count: 7)
2014-05-19 12:49:04 +05:30
expect(rendered).
to have_selector("input[checked='checked'][type='checkbox'][value='1']", count: 4)
expect(rendered).to include('Lorem Ipsum Dolsum')
2014-05-19 12:49:04 +05:30
expect(rendered).
to include('Lorem ipsum dolor sit amet, consectetuer adipiscing elit')
expect(rendered).
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