Sha256: 18d933e9f079efecc93296e997c776697989ce55106a06cd8f642c52132b492d

Contents?: true

Size: 762 Bytes

Versions: 35

Compression:

Stored size: 762 Bytes

Contents

#!/usr/bin/env rspec
require '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

35 entries across 35 versions & 3 rubygems

Version Path
puppet-2.7.26 spec/unit/provider/user/hpux_spec.rb
puppet-2.7.25 spec/unit/provider/user/hpux_spec.rb
puppet-2.7.24 spec/unit/provider/user/hpux_spec.rb
puppet-2.7.23 spec/unit/provider/user/hpux_spec.rb
puppet-2.7.22 spec/unit/provider/user/hpux_spec.rb
puppet-2.7.21 spec/unit/provider/user/hpux_spec.rb
puppet-2.7.20 spec/unit/provider/user/hpux_spec.rb
puppet-2.7.20.rc1 spec/unit/provider/user/hpux_spec.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/puppet-2.7.18/spec/unit/provider/user/hpux_spec.rb
puppet-2.7.19 spec/unit/provider/user/hpux_spec.rb
supply_drop-0.11.0 examples/vendored-puppet/vendor/puppet-2.7.8/spec/unit/provider/user/hpux_spec.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/puppet-2.7.18/spec/unit/provider/user/hpux_spec.rb
supply_drop-0.10.2 examples/vendored-puppet/vendor/puppet-2.7.8/spec/unit/provider/user/hpux_spec.rb
puppet-2.7.18 spec/unit/provider/user/hpux_spec.rb
supply_drop-0.10.1 examples/vendored-puppet/vendor/puppet-2.7.8/spec/unit/provider/user/hpux_spec.rb
supply_drop-0.10.0 examples/vendored-puppet/vendor/puppet-2.7.8/spec/unit/provider/user/hpux_spec.rb
puppet-2.7.17 spec/unit/provider/user/hpux_spec.rb
puppet-2.7.16 spec/unit/provider/user/hpux_spec.rb
puppet-2.7.14 spec/unit/provider/user/hpux_spec.rb
puppet-2.7.13 spec/unit/provider/user/hpux_spec.rb