Sha256: 272874e2cd5767b05131f7b2cb53e0585c1ab3db5afaf3e0d09cf76f1c95c6fb

Contents?: true

Size: 891 Bytes

Versions: 8

Compression:

Stored size: 891 Bytes

Contents

require "#{File.dirname(__FILE__)}/../../../test_helper"

include_fixture_resources

class UserResourceTest < Test::Unit::TestCase
  context "Base" do
    setup do
      PoolParty::Resource.define_resource_methods
      @res = PoolParty::Resources::User.new "random", :comment => "Random User", :uid => "1000", :gid => "users", :home => "/home/random", :shell => "/bin/zsh",  :password => "$1$JJsvHslV$szsCjVEroftprNn4JHtDi."
      @base = DependencyResolvers::Chef
      @base.compile_directory = test_dir
    end
    
    should "have the mount method denoted by has_method_name" do
str = <<-EOS
user "random" do
  action :create
  comment "Random User"
  uid \"1000\"
  gid "users"
  home "/home/random"
  shell "/bin/zsh"
  password "$1$JJsvHslV$szsCjVEroftprNn4JHtDi."
  supports :manage_home => false
end
EOS

      assert_equal str.chomp, @base.compile(@res)
    end
    
  end
  
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
auser-poolparty-1.3.14 test/lib/poolparty/resources/user_test.rb
auser-poolparty-1.3.15 test/lib/poolparty/resources/user_test.rb
auser-poolparty-1.3.16 test/lib/poolparty/resources/user_test.rb
auser-poolparty-1.3.17 test/lib/poolparty/resources/user_test.rb
fairchild-poolparty-1.3.17 test/lib/poolparty/resources/user_test.rb
poolparty-1.3.15 test/lib/poolparty/resources/user_test.rb
poolparty-1.3.14 test/lib/poolparty/resources/user_test.rb
poolparty-1.3.13 test/lib/poolparty/resources/user_test.rb