Sha256: be8af081aa0bcd20b1476aa2ef968c84056a9255d6913bf1f15b8b4660cbbc96

Contents?: true

Size: 797 Bytes

Versions: 19

Compression:

Stored size: 797 Bytes

Contents

#!/usr/bin/env ruby

require File.dirname(__FILE__) + '/../../../spec_helper'

provider_class = Puppet::Type.type(:user).provider(:hpuxuseradd)

describe provider_class do
  # left from the useradd test... I have no clue what I'm doing.
  before do
    @resource = stub("resource", :name => "myuser", :managehome? => nil, :should => "fakeval", :[] => "fakeval")
    @provider = provider_class.new(@resource)
  end

  it "should add -F when modifying a user" do
    @resource.expects(:allowdupe?).returns true
    @provider.expects(:execute).with { |args| args.include?("-F") }
    @provider.uid = 1000
  end

  it "should add -F when deleting a user" do
    @provider.stubs(:exists?).returns(true)
    @provider.expects(:execute).with { |args| args.include?("-F") }
    @provider.delete
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
puppet-2.6.18 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.17 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.16 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.15 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.14 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.13 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.12 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.11 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.10 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.9 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.8 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.7 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.6 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.5 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.4 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.3 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.2 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.1 spec/unit/provider/user/hpux_spec.rb
puppet-2.6.0 spec/unit/provider/user/hpux_spec.rb