Sha256: 9c6e1f06866ca0a7feab343c74fc05790cf65546466274393bddcae17edb98ee

Contents?: true

Size: 509 Bytes

Versions: 8

Compression:

Stored size: 509 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

8 entries across 8 versions & 1 rubygems

Version Path
can_can_dry-0.3.1 test/lib/can_can_dry/path_recognizer_test.rb
can_can_dry-0.3.0 test/lib/can_can_dry/path_recognizer_test.rb
can_can_dry-0.2.0 test/lib/can_can_dry/path_recognizer_test.rb
can_can_dry-0.1.0 test/lib/can_can_dry/path_recognizer_test.rb
can_can_dry-0.0.8 test/lib/can_can_dry/path_recognizer_test.rb
can_can_dry-0.0.7 test/lib/can_can_dry/path_recognizer_test.rb
can_can_dry-0.0.6 test/lib/can_can_dry/path_recognizer_test.rb
can_can_dry-0.0.5 test/lib/can_can_dry/path_recognizer_test.rb