diff --git a/tests/Feature/Account/AccountEmailQuotaTest.php b/tests/Feature/Account/AccountEmailQuotaTest.php new file mode 100644 index 000000000000..efd89b9190fa --- /dev/null +++ b/tests/Feature/Account/AccountEmailQuotaTest.php @@ -0,0 +1,62 @@ +faker = Factory::create(); + $this->buildCache(true); + $this->makeTestData(); + } + + public function testQuotaValidRule() + { + Cache::increment($this->account->key); + + $this->assertFalse($this->account->emailQuotaExceeded()); + } + + + public function testQuotaInValidRule() + { + Cache::increment($this->account->key, 3000); + + $this->assertTrue($this->account->emailQuotaExceeded()); + } + +}