Sha256: 1c479dd7a091192c694e4965c045c9dfa67d1291c75364df07d7e88352841eab
Contents?: true
Size: 850 Bytes
Versions: 28
Compression:
Stored size: 850 Bytes
Contents
require 'test_helper' module Workarea module Admin class SegmentsIntegrationTest < Workarea::IntegrationTest include Admin::IntegrationTest def test_update segment = create_segment(name: 'Custom Segment') patch admin.segment_path(segment), params: { segment: { name: 'foo bar' } } assert_equal(1, Segment.count) assert_equal('foo bar', Segment.first.name) end def test_destroy segment = create_segment(name: 'Custom Segment') delete admin.segment_path(segment) assert_equal(0, Segment.count) create_life_cycle_segments life_cycle = Segment::LoyalCustomer.first assert_no_difference 'Segment.count' do delete admin.segment_path(life_cycle) assert_equal(204, response.status) end end end end end
Version data entries
28 entries across 28 versions & 1 rubygems