Sha256: ed9a88118d2e34f5b9b091f68ddbd6abebda1767650eb28aabb06b6dc6b0729e
Contents?: true
Size: 1.15 KB
Versions: 15
Compression:
Stored size: 1.15 KB
Contents
require File.join(File.dirname(File.expand_path(__FILE__)), "/../spec_helper.rb") if not INTERPRETER.euid? puts "NOTE: Can't check 'euid' on this platform, #{__FILE__}" elsif not INTERPRETER.superuser? puts "NOTE: Must be root to check #{__FILE__}" elsif not INTERPRETER.account_manager.available?(:invalidate) puts "NOTE: Can't check AccountManager::NSCD on this platform, #{__FILE__}" else describe AutomateIt::AccountManager::NSCD do before(:all) do @a = AutomateIt.new(:verbosity => Logger::WARN) @m = @a.account_manager @d = @m[:nscd] end it "should know what NSCD databases are associated with passwd" do for query in %w(user users passwd password) @d.database_for(query).should == :passwd end end it "should know what NSCD databases are associated with group" do for query in %w(group groups) @d.database_for(query).should == :group end end it "should fail with invalid queries" do lambda { @d.database_for(:stuff) }.should raise_error(ArgumentError) end it "should invalidate NSCD databases" do @m.invalidate(:passwd).should be_true end end end
Version data entries
15 entries across 15 versions & 2 rubygems