forked from openlp/openlp
Add test
This commit is contained in:
parent
2466a7d8fa
commit
854149408f
@ -197,3 +197,17 @@ class TestUi(TestCase):
|
|||||||
|
|
||||||
# THEN: The index should have changed
|
# THEN: The index should have changed
|
||||||
self.assertEqual(2, combo.currentIndex())
|
self.assertEqual(2, combo.currentIndex())
|
||||||
|
|
||||||
|
def test_create_widget_action(self):
|
||||||
|
"""
|
||||||
|
Test creating an action for a widget
|
||||||
|
"""
|
||||||
|
# GIVEN: A button
|
||||||
|
button = QtGui.QPushButton()
|
||||||
|
|
||||||
|
# WHEN: We call the function
|
||||||
|
action = create_widget_action(button, 'some action')
|
||||||
|
|
||||||
|
# THEN: The action should be returned
|
||||||
|
self.assertIsInstance(action, QtGui.QAction)
|
||||||
|
self.assertEqual(action.objectName(), 'some action')
|
||||||
|
Loading…
Reference in New Issue
Block a user