Sha256: 5d2b606c6b83a026eb1da92fab514b1b0a5c492b5a16fc5f41523a469193c3dc

Contents?: true

Size: 887 Bytes

Versions: 20

Compression:

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

20 entries across 20 versions & 3 rubygems

Version Path
auser-poolparty-1.3.0 test/lib/poolparty/resources/user_test.rb
auser-poolparty-1.3.1 test/lib/poolparty/resources/user_test.rb
auser-poolparty-1.3.10 test/lib/poolparty/resources/user_test.rb
auser-poolparty-1.3.11 test/lib/poolparty/resources/user_test.rb
auser-poolparty-1.3.12 test/lib/poolparty/resources/user_test.rb
auser-poolparty-1.3.13 test/lib/poolparty/resources/user_test.rb
auser-poolparty-1.3.2 test/lib/poolparty/resources/user_test.rb
auser-poolparty-1.3.3 test/lib/poolparty/resources/user_test.rb
auser-poolparty-1.3.4 test/lib/poolparty/resources/user_test.rb
auser-poolparty-1.3.5 test/lib/poolparty/resources/user_test.rb
auser-poolparty-1.3.6 test/lib/poolparty/resources/user_test.rb
auser-poolparty-1.3.7 test/lib/poolparty/resources/user_test.rb
auser-poolparty-1.3.8 test/lib/poolparty/resources/user_test.rb
fairchild-poolparty-1.3.5 test/lib/poolparty/resources/user_test.rb
poolparty-1.3.8 test/lib/poolparty/resources/user_test.rb
poolparty-1.3.7 test/lib/poolparty/resources/user_test.rb
poolparty-1.3.6 test/lib/poolparty/resources/user_test.rb
poolparty-1.3.4 test/lib/poolparty/resources/user_test.rb
poolparty-1.3.3 test/lib/poolparty/resources/user_test.rb
poolparty-1.3.1 test/lib/poolparty/resources/user_test.rb