From 79c5d61d9483f7cf0b63be3aeadc3afca1a72862 Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Sat, 12 Jul 2014 22:00:58 +0200 Subject: [PATCH] Negative test --- .../openlp_plugins/songs/test_mediaitem.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tests/functional/openlp_plugins/songs/test_mediaitem.py b/tests/functional/openlp_plugins/songs/test_mediaitem.py index f3ae511ea..a473f8569 100644 --- a/tests/functional/openlp_plugins/songs/test_mediaitem.py +++ b/tests/functional/openlp_plugins/songs/test_mediaitem.py @@ -155,7 +155,7 @@ class TestMediaItem(TestCase, TestMixin): # THEN: The songbook should be in the footer self.assertEqual(service_item.raw_footer, ['My Song', 'My copyright', 'My songbook #12']) - def build_song_footer_copyright_test(self): + def build_song_footer_copyright_enabled_test(self): """ Test building song footer with displaying the copyright symbol """ @@ -172,6 +172,22 @@ class TestMediaItem(TestCase, TestMixin): # THEN: The copyright symbol should be in the footer self.assertEqual(service_item.raw_footer, ['My Song', '© My copyright']) + def build_song_footer_copyright_disabled_test(self): + """ + Test building song footer without displaying the copyright symbol + """ + # GIVEN: A Song and a Service Item; displaying the copyright symbol should be disabled by default + mock_song = MagicMock() + mock_song.title = 'My Song' + mock_song.copyright = 'My copyright' + service_item = ServiceItem(None) + + # WHEN: I generate the Footer with default settings + self.media_item.generate_footer(service_item, mock_song) + + # THEN: The copyright symbol should not be in the footer + self.assertEqual(service_item.raw_footer, ['My Song', 'My copyright']) + def authors_match_test(self): """ Test the author matching when importing a song from a service