Skip to content

Commit

Permalink
Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ej2 committed Jan 4, 2024
1 parent b487322 commit 453d386
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/integration/test_recurringtransaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from quickbooks.objects.vendor import Vendor
from tests.integration.test_base import QuickbooksTestCase


class RecurringTransactionTest(QuickbooksTestCase):
def setUp(self):
super(RecurringTransactionTest, self).setUp()
Expand Down
21 changes: 19 additions & 2 deletions tests/unit/objects/test_recurringtransaction.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
import unittest

from quickbooks import QuickBooks
from quickbooks.objects.recurringtransaction import RecurringTransaction
from quickbooks.objects.recurringtransaction import RecurringTransaction, ScheduleInfo, RecurringInfo


class RecurringTransactionTests(unittest.TestCase):
def test_valid_object_name(self):
obj = RecurringTransaction()
client = QuickBooks()
result = client.isvalid_object_name(obj.qbo_object_name)

self.assertTrue(result)
self.assertTrue(result)


class ScheduleInfoTest(unittest.TestCase):
def test_create(self):
obj = ScheduleInfo()
obj.DayOfMonth = "1"

self.assertEqual(obj.DayOfMonth, "1")


class RecurringInfoTest(unittest.TestCase):
def test_create(self):
obj = RecurringInfo()

self.assertEqual(obj.RecurType, "Automated")

0 comments on commit 453d386

Please sign in to comment.