Sha256: 94227b27387503d2b30c6eaaf7ab9efe34fc827a84e496c37a459e9306e7d924

Contents?: true

Size: 713 Bytes

Versions: 28

Compression:

Stored size: 713 Bytes

Contents

require 'test_helper'

module Workarea
  module Admin
    class CreateSegmentsIntegrationTest < Workarea::IntegrationTest
      include Admin::IntegrationTest

      def test_creates_segments
        post admin.create_segments_path, params: { segment: { name: 'foo bar' } }

        assert_equal(1, Segment.count)
        assert_equal('foo bar', Segment.desc(:created_at).first.name)
      end

      def test_updates_segments
        segment = create_segment(name: 'Custom Segment')

        post admin.create_segments_path,
          params: { id: segment.id, segment: { name: 'foo bar' } }

        assert_equal(1, Segment.count)
        assert_equal('foo bar', Segment.first.name)
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
workarea-admin-3.5.27 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.26 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.25 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.23 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.22 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.21 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.20 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.19 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.18 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.17 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.16 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.15 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.14 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.13 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.12 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.11 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.10 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.9 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.8 test/integration/workarea/admin/create_segments_integration_test.rb
workarea-admin-3.5.7 test/integration/workarea/admin/create_segments_integration_test.rb