Sha256: 3803edbe3f89a40f6e3f3c21a5cc895fad5566bbba2eec69fc105d1f4c53ff2d

Contents?: true

Size: 955 Bytes

Versions: 21

Compression:

Stored size: 955 Bytes

Contents

require 'test_helper'

class OodAppkitTest < ActiveSupport::TestCase
  test "truth" do
    assert_kind_of Module, OodAppkit
  end

  # FIXME: move these tests elsewhere
  #
  test "shell urls" do
    s = OodAppkit::ShellUrl.new(base_url: "/sh")

    assert_equal "/sh/ssh/default", s.url.to_s
    assert_equal "/sh/ssh/oakley", s.url(host: "oakley").to_s
    assert_equal "/sh/ssh/oakley", s.url(host: :oakley).to_s
    assert_equal "/sh/ssh/oakley/nfs/gpfs", s.url(host: :oakley, path: "/nfs/gpfs").to_s
    assert_equal "/sh/ssh/default/nfs/gpfs", s.url(path: "/nfs/gpfs").to_s
    assert_equal "/sh/ssh/default/nfs/gpfs", s.url(path: Pathname.new("/nfs/gpfs")).to_s
  end

  test "files urls" do
    f = OodAppkit::FilesUrl.new(base_url: "/f")

    assert_equal "/f/fs/nfs/17/efranz/ood_dev", f.url(path: "/nfs/17/efranz/ood_dev").to_s
    assert_equal "/f/fs/nfs/17/efranz/ood_dev", f.url(path: Pathname.new("/nfs/17/efranz/ood_dev")).to_s
  end

end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
ood_appkit-1.0.3 test/ood_appkit_test.rb
ood_appkit-1.0.2 test/ood_appkit_test.rb
ood_appkit-1.0.1 test/ood_appkit_test.rb
ood_appkit-1.0.0 test/ood_appkit_test.rb
ood_appkit-0.3.6 test/ood_appkit_test.rb
ood_appkit-0.3.5 test/ood_appkit_test.rb
ood_appkit-0.3.4 test/ood_appkit_test.rb
ood_appkit-0.3.3 test/ood_appkit_test.rb
ood_appkit-0.3.2 test/ood_appkit_test.rb
ood_appkit-0.3.1 test/ood_appkit_test.rb
ood_appkit-0.3.0 test/ood_appkit_test.rb
ood_appkit-0.2.8 test/ood_appkit_test.rb
ood_appkit-0.2.7 test/ood_appkit_test.rb
ood_appkit-0.2.6 test/ood_appkit_test.rb
ood_appkit-0.2.5 test/ood_appkit_test.rb
ood_appkit-0.2.3 test/ood_appkit_test.rb
ood_appkit-0.2.2 test/ood_appkit_test.rb
ood_appkit-0.2.1 test/ood_appkit_test.rb
ood_appkit-0.1.0 test/ood_appkit_test.rb
ood_appkit-0.0.3 test/ood_appkit_test.rb