Sha256: 4e7403aa9324203a23716eb9571401802bb511fbc138aadf9f7618877ffc18cc

Contents?: true

Size: 708 Bytes

Versions: 62

Compression:

Stored size: 708 Bytes

Contents

require 'test_helper'

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

      def test_creates_a_redirect
        post admin.navigation_redirects_path,
          params: { redirect: { path: '/foo', destination: '/bar' } }

        assert_equal(1, Navigation::Redirect.count)

        redirect = Navigation::Redirect.first
        assert_equal('/foo', redirect.path)
        assert_equal('/bar', redirect.destination)
      end

      def test_deletes_a_redirect
        redirect = create_redirect
        delete admin.navigation_redirect_path(redirect)
        assert(Navigation::Redirect.empty?)
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-admin-3.5.27 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.5.26 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.4.45 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.5.25 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.5.23 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.4.44 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.5.22 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.4.43 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.5.21 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.4.42 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.5.20 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.4.41 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.5.19 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.4.40 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.5.18 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.4.39 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.5.17 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.4.38 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.5.16 test/integration/workarea/admin/redirects_integration_test.rb
workarea-admin-3.4.37 test/integration/workarea/admin/redirects_integration_test.rb