Skip to content

Commit b4111df

Browse files
committed
Retab spec
1 parent 4ef3de8 commit b4111df

File tree

1 file changed

+66
-66
lines changed

1 file changed

+66
-66
lines changed

spec/lib/rex/parser/group_policy_preferences_spec.rb

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -88,25 +88,25 @@
8888
cpassword_bad = "blah"
8989

9090
describe Rex::Parser::GPP do
91-
GPP = Rex::Parser::GPP
92-
93-
##
94-
# Decrypt
95-
##
96-
it "Decrypt returns Local*P4ssword! for normal cpassword" do
97-
result = GPP.decrypt(cpassword_normal)
98-
result.should eq("Local*P4ssword!")
99-
end
100-
101-
it "Decrypt returns blank for bad cpassword" do
102-
result = GPP.decrypt(cpassword_bad)
103-
result.should eq("")
104-
end
105-
106-
it "Decrypt returns blank for nil cpassword" do
107-
result = GPP.decrypt(nil)
108-
result.should eq("")
109-
end
91+
GPP = Rex::Parser::GPP
92+
93+
##
94+
# Decrypt
95+
##
96+
it "Decrypt returns Local*P4ssword! for normal cpassword" do
97+
result = GPP.decrypt(cpassword_normal)
98+
result.should eq("Local*P4ssword!")
99+
end
100+
101+
it "Decrypt returns blank for bad cpassword" do
102+
result = GPP.decrypt(cpassword_bad)
103+
result.should eq("")
104+
end
105+
106+
it "Decrypt returns blank for nil cpassword" do
107+
result = GPP.decrypt(nil)
108+
result.should eq("")
109+
end
110110

111111
it 'Decrypts a cpassword containing junk padding' do
112112
cpassword_win2k8.each do |encrypted, expected|
@@ -115,51 +115,51 @@
115115
end
116116
end
117117

118-
##
119-
# Parse
120-
##
121-
122-
it "Parse returns empty [] for nil" do
123-
GPP.parse(nil).should be_empty
124-
end
125-
126-
it "Parse returns results for xml_ms and password is empty" do
127-
results = GPP.parse(xml_ms)
128-
results.should_not be_empty
129-
results[0][:PASS].should be_empty
130-
end
131-
132-
it "Parse returns results for xml_datasrc, and attributes, and password is test1" do
133-
results = GPP.parse(xml_datasrc)
134-
results.should_not be_empty
135-
results[0].include?(:ATTRIBUTES).should be_true
136-
results[0][:ATTRIBUTES].should_not be_empty
137-
results[0][:PASS].should eq("test")
138-
end
139-
140-
xmls = []
141-
xmls << xml_group
142-
xmls << xml_drive
143-
xmls << xml_schd
144-
xmls << xml_serv
145-
xmls << xml_datasrc
146-
147-
it "Parse returns results for all good xmls and passwords" do
148-
xmls.each do |xml|
149-
results = GPP.parse(xml)
150-
results.should_not be_empty
151-
results[0][:PASS].should_not be_empty
152-
end
153-
end
154-
155-
##
156-
# Create_Tables
157-
##
158-
it "Create_tables returns tables for all good xmls" do
159-
xmls.each do |xml|
160-
results = GPP.parse(xml)
161-
tables = GPP.create_tables(results, "test")
162-
tables.should_not be_empty
163-
end
164-
end
118+
##
119+
# Parse
120+
##
121+
122+
it "Parse returns empty [] for nil" do
123+
GPP.parse(nil).should be_empty
124+
end
125+
126+
it "Parse returns results for xml_ms and password is empty" do
127+
results = GPP.parse(xml_ms)
128+
results.should_not be_empty
129+
results[0][:PASS].should be_empty
130+
end
131+
132+
it "Parse returns results for xml_datasrc, and attributes, and password is test1" do
133+
results = GPP.parse(xml_datasrc)
134+
results.should_not be_empty
135+
results[0].include?(:ATTRIBUTES).should be_true
136+
results[0][:ATTRIBUTES].should_not be_empty
137+
results[0][:PASS].should eq("test")
138+
end
139+
140+
xmls = []
141+
xmls << xml_group
142+
xmls << xml_drive
143+
xmls << xml_schd
144+
xmls << xml_serv
145+
xmls << xml_datasrc
146+
147+
it "Parse returns results for all good xmls and passwords" do
148+
xmls.each do |xml|
149+
results = GPP.parse(xml)
150+
results.should_not be_empty
151+
results[0][:PASS].should_not be_empty
152+
end
153+
end
154+
155+
##
156+
# Create_Tables
157+
##
158+
it "Create_tables returns tables for all good xmls" do
159+
xmls.each do |xml|
160+
results = GPP.parse(xml)
161+
tables = GPP.create_tables(results, "test")
162+
tables.should_not be_empty
163+
end
164+
end
165165
end

0 commit comments

Comments
 (0)