spec/adauth_spec.rb in adauth-0.1.0 vs spec/adauth_spec.rb in adauth-1.0.0pre
- old
+ new
@@ -58,9 +58,19 @@
it "should dis-allow users who are not in an allowed group" do
Adauth.config.allowed_groups = @yaml["domain"]["fail_allowed_groups"]
Adauth.authenticate(@yaml["user"]["login"], @yaml["user"]["password"]).should be_nil
end
+
+ it "should dis-allow users who are in a denied group" do
+ Adauth.config.denied_groups = @yaml["domain"]["pass_allowed_groups"]
+ Adauth.authenticate(@yaml["user"]["login"], @yaml["user"]["password"]).should be_nil
+ end
+
+ it "should dis-allow users who are in a denied group" do
+ Adauth.config.denied_groups = @yaml["domain"]["fail_allowed_groups"]
+ Adauth.authenticate(@yaml["user"]["login"], @yaml["user"]["password"]).should be_a Adauth::User
+ end
end
describe Adauth::User do
before :each do
@yaml = YAML::load(File.open('spec/test_data.yml'))
\ No newline at end of file