Sha256: a68417f905ad8e7c313e2940130063f1e7b19fbd334ca4f3c3f9a1f5cef08c15
Contents?: true
Size: 764 Bytes
Versions: 15
Compression:
Stored size: 764 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, params: {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
15 entries across 15 versions & 1 rubygems