Sha256: 342caefaf1b58873b5c659da7411e129c7878e6a812dda7108e4f014bee714c0
Contents?: true
Size: 589 Bytes
Versions: 1
Compression:
Stored size: 589 Bytes
Contents
require 'spec_helper' describe Spree::NewslettersController, type: :controller do context '#create' do it 'returns true' do post :create, params: { newsletters: { name: 'User Test', email: 'user@test.com' } } expect(response.status).to eq(302) expect(flash[:success]).to include(Spree.t('newsletter.controller.success')) end it 'returns false' do post :create, params: { newsletters: { name: '', email: '' } } expect(response.status).to eq(302) expect(flash[:error]).to include(Spree.t('newsletter.controller.error')) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
solidus_newsletter-1.0 | spec/controllers/spree/newsletters_controller_spec.rb |