@@ -40,15 +40,15 @@ def authenticate
40
40
41
41
it "records two successful audit entries" do
42
42
expect ( AuditEvent ) . to receive ( :success ) . with ( {
43
- :event => 'authenticate_database' ,
44
- :userid => 'alice' ,
45
- :message => "User alice successfully validated by EVM" ,
46
- } )
43
+ :event => 'authenticate_database' ,
44
+ :userid => 'alice' ,
45
+ :message => "User alice successfully validated by EVM" ,
46
+ } )
47
47
expect ( AuditEvent ) . to receive ( :success ) . with ( {
48
- :event => 'authenticate_database' ,
49
- :userid => 'alice' ,
50
- :message => "Authentication successful for user alice" ,
51
- } )
48
+ :event => 'authenticate_database' ,
49
+ :userid => 'alice' ,
50
+ :message => "Authentication successful for user alice" ,
51
+ } )
52
52
expect ( AuditEvent ) . not_to receive ( :failure )
53
53
authenticate
54
54
end
@@ -93,10 +93,10 @@ def authenticate
93
93
94
94
it "records one failing audit entry" do
95
95
expect ( AuditEvent ) . to receive ( :failure ) . with ( {
96
- :event => 'authenticate_database' ,
97
- :userid => 'alice' ,
98
- :message => "Authentication failed for userid alice" ,
99
- } )
96
+ :event => 'authenticate_database' ,
97
+ :userid => 'alice' ,
98
+ :message => "Authentication failed for userid alice" ,
99
+ } )
100
100
expect ( AuditEvent ) . not_to receive ( :success )
101
101
authenticate rescue nil
102
102
end
@@ -123,10 +123,10 @@ def authenticate
123
123
124
124
it "records one failing audit entry" do
125
125
expect ( AuditEvent ) . to receive ( :failure ) . with ( {
126
- :event => 'authenticate_database' ,
127
- :userid => 'bob' ,
128
- :message => "Authentication failed for userid bob" ,
129
- } )
126
+ :event => 'authenticate_database' ,
127
+ :userid => 'bob' ,
128
+ :message => "Authentication failed for userid bob" ,
129
+ } )
130
130
expect ( AuditEvent ) . not_to receive ( :success )
131
131
authenticate rescue nil
132
132
end
@@ -147,15 +147,15 @@ def authenticate
147
147
148
148
it "records two successful audit entries" do
149
149
expect ( AuditEvent ) . to receive ( :success ) . with ( {
150
- :event => 'authenticate_database' ,
151
- :userid => 'vincent' ,
152
- :message => "User vincent successfully validated by EVM" ,
153
- } )
150
+ :event => 'authenticate_database' ,
151
+ :userid => 'vincent' ,
152
+ :message => "User vincent successfully validated by EVM" ,
153
+ } )
154
154
expect ( AuditEvent ) . to receive ( :success ) . with ( {
155
- :event => 'authenticate_database' ,
156
- :userid => 'vincent' ,
157
- :message => "Authentication successful for user vincent" ,
158
- } )
155
+ :event => 'authenticate_database' ,
156
+ :userid => 'vincent' ,
157
+ :message => "Authentication successful for user vincent" ,
158
+ } )
159
159
expect ( AuditEvent ) . not_to receive ( :failure )
160
160
authenticate
161
161
end
0 commit comments