Sha256: b22735f8b5e8092eaf8e194746b2436c3ac373cd1d82b6ceadd6d819530575a4
Contents?: true
Size: 857 Bytes
Versions: 4
Compression:
Stored size: 857 Bytes
Contents
# encoding: utf-8 require File.dirname(__FILE__) + '/../spec_helper' describe SendGrid4r::Factory::SegmentFactory do describe 'unit test', :ut do before do Dotenv.load @segment_factory = SendGrid4r::Factory::SegmentFactory.new @condition_factory = SendGrid4r::Factory::ConditionFactory.new @condition = @condition_factory.create( field: 'last_name', value: 'Miller', operator: 'eq', and_or: '') @expect = {} @expect[:id] = nil @expect[:name] = 'Last Name Miller' @expect[:list_id] = nil @expect[:conditions] = [@condition] @expect[:recipient_count] = nil end it 'specify all params' do segment = @segment_factory.create( name: 'Last Name Miller', conditions: [@condition] ) expect(segment).to eq(@expect) end end end
Version data entries
4 entries across 4 versions & 1 rubygems