Sha256: 83f53bd6131d80ae40ea22ef31341cff14410ec0e0851eb38603a12b9f2d38ab

Contents?: true

Size: 510 Bytes

Versions: 1

Compression:

Stored size: 510 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

module CanCanDry
  class PathRecognizerTest < ActiveSupport::TestCase
    test 'remove_root_path' do
      [%w[/path/to/action /prefix/ /prefix/path/to/action],
       %w[/path/to/action /prefix /prefix/path/to/action],
       %w[/path / /path],
       ['/path', '', '/path'],
       %w[/unknown/path /abc /unknown/path]].each do |s|
        assert_equal s[0], ::CanCanDry::PathRecognizer.send(:remove_root_path, s[1], s[2]), s
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
can_can_dry-0.4.0 test/lib/can_can_dry/path_recognizer_test.rb