Sha256: 3384005ffede1eb942d11f3ed304bfbee86c304bc3f89bdc40c0f9be00d6e4cf
Contents?: true
Size: 756 Bytes
Versions: 1
Compression:
Stored size: 756 Bytes
Contents
require 'rails_helper' describe Fe::Admin::EmailTemplatesController, type: :controller do let(:email_template) { create(:email_template) } context '#index' do it 'should work' do email_template = create(:email_template, name: 'Template') get :index expect(assigns(:email_templates)).to eq([email_template]) end end context '#new' do it 'should work' do get :new expect(assigns(:email_template)).to_not be_nil end end context '#create' do it 'should work' do expect { post :create, email_template: { name: 'Name', subject: 'Subject', content: 'Content' } }.to change{Fe::EmailTemplate.count}.by(1) expect(assigns(:email_template)).to_not be_nil end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fe-1.0.0 | spec/controllers/fe/admin/email_templates_controller_spec.rb |