]> git.stg.codes - stg.git/blobdiff - tests/test_fee_charge_rules.cpp
Do not log about successful plugin stop if error occures
[stg.git] / tests / test_fee_charge_rules.cpp
index 657a609ae036c9264e64201ea0d61957b4d198d1..dfe7e850f18188f4d1a1b4714d81295bbab57f3e 100644 (file)
@@ -8,8 +8,6 @@
 #include "testadmin.h"
 #include "teststore.h"
 
 #include "testadmin.h"
 #include "teststore.h"
 
-const volatile time_t stgTime = 0;
-
 namespace tut
 {
     struct fee_charge_rules_data {
 namespace tut
 {
     struct fee_charge_rules_data {
@@ -89,7 +87,7 @@ namespace tut
         user.ProcessDayFee();
         ensure_equals("user.cash == 0", user.GetProperty().cash, 0);
         user.ProcessDayFee();
         user.ProcessDayFee();
         ensure_equals("user.cash == 0", user.GetProperty().cash, 0);
         user.ProcessDayFee();
-        ensure_equals("user.cash == 0", user.GetProperty().cash, 0);
+        ensure_equals("user.cash == 0", user.GetProperty().cash, -50);
         cash = 49;
         ensure_equals("user.cash == 49", user.GetProperty().cash, 49);
         user.ProcessDayFee();
         cash = 49;
         ensure_equals("user.cash == 49", user.GetProperty().cash, 49);
         user.ProcessDayFee();
@@ -121,10 +119,11 @@ namespace tut
         user.ProcessDayFee();
         ensure_equals("user.cash == 50", user.GetProperty().cash, 50);
         user.ProcessDayFee();
         user.ProcessDayFee();
         ensure_equals("user.cash == 50", user.GetProperty().cash, 50);
         user.ProcessDayFee();
-        ensure_equals("user.cash == 50", user.GetProperty().cash, 50);
-        tariffs.SetFee(49);
+        ensure_equals("user.cash == 50", user.GetProperty().cash, 0);
+        cash = 50;
+        tariffs.SetFee(51);
         user.ProcessDayFee();
         user.ProcessDayFee();
-        ensure_equals("user.cash == 1", user.GetProperty().cash, 1);
+        ensure_equals("user.cash == 50", user.GetProperty().cash, 50);
         cash = 0;
         ensure_equals("user.cash == 0", user.GetProperty().cash, 0);
         user.ProcessDayFee();
         cash = 0;
         ensure_equals("user.cash == 0", user.GetProperty().cash, 0);
         user.ProcessDayFee();