Sha256: 9a78a89f128db5c7785869c33257adb140bce4bf479b5107654dc704d6a02d26

Contents?: true

Size: 502 Bytes

Versions: 1

Compression:

Stored size: 502 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Spree::Newsletter, type: :model do
  context 'validations' do
    it 'validates by default' do
      expect(build(:newsletter, name: 'User Test', email: 'user@test.com')).to be_valid
    end

    it 'does not validate with a nil name' do
      expect(build(:newsletter, name: nil)).to_not be_valid
    end

    it 'does not validate with a nil email' do
      expect(build(:newsletter, email: nil)).to_not be_valid
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_newsletter-1.1 spec/models/spree/newsletter_spec.rb