summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authornimisha <nimisha.sharad@msystechnologies.com>2017-01-27 15:44:48 +0530
committernimisha <nimisha.sharad@msystechnologies.com>2017-02-02 18:00:37 +0530
commitc39006c5f757281525703d8506bfb6d4e9340082 (patch)
tree05477983a26f0d2db4bcabceaa9ac6c475c1301e /spec/unit
parentdd75bf444a73bc35c226aabaf4f5ea26b8528285 (diff)
downloadchef-c39006c5f757281525703d8506bfb6d4e9340082.tar.gz
Fixed bugs, review comments and specs
Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/mixin/user_identity_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/unit/mixin/user_identity_spec.rb b/spec/unit/mixin/user_identity_spec.rb
index 799260b25a..790e0a6ab9 100644
--- a/spec/unit/mixin/user_identity_spec.rb
+++ b/spec/unit/mixin/user_identity_spec.rb
@@ -94,6 +94,21 @@ shared_examples_for "a consumer of the ::Chef::Mixin::UserIdentity mixin" do
it_behaves_like "it received valid credentials"
end
end
+
+ context "when the domain is provided in both username and domain" do
+ let(:domain) { "some_domain" }
+ let(:password) { "we.funk!" }
+
+ context "when username is in the form domain\\user" do
+ let(:username) { "mothership\\starchild" }
+ it_behaves_like "it received invalid credentials"
+ end
+
+ context "when username is in the form user@domain" do
+ let(:username) { "starchild@mothership" }
+ it_behaves_like "it received invalid credentials"
+ end
+ end
end
context "when the username is not specified" do