mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
View specs, added factories, fixed bugs
This commit is contained in:
parent
322ddd1501
commit
d1e9bd06a6
33 changed files with 319 additions and 12 deletions
23
spec/views/admin/emails/index.html.haml_spec.rb
Normal file
23
spec/views/admin/emails/index.html.haml_spec.rb
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe "admin/emails/index" do
|
||||
it 'renders conference sidebar' do
|
||||
assign :settings, create(:email_settings)
|
||||
expect(sidebar).to be true
|
||||
end
|
||||
|
||||
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)
|
||||
expect(rendered).to have_selector(
|
||||
"input[checked='checked'][type='checkbox'][value='1']", :count=> 1)
|
||||
expect(rendered).to include('Lorem Ipsum Dolsum')
|
||||
expect(rendered).to include(
|
||||
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit')
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue