From 3cbb79c465c422b525b97bc8555d4c7a38bfa8df Mon Sep 17 00:00:00 2001 From: Pradeep CE (cep) Date: Feb 23 2017 21:51:34 +0000 Subject: Add tests for 'open changed file' icon in PR diffs --- diff --git a/tests/test_pagure_flask_ui_fork.py b/tests/test_pagure_flask_ui_fork.py index 01ac157..63861b1 100644 --- a/tests/test_pagure_flask_ui_fork.py +++ b/tests/test_pagure_flask_ui_fork.py @@ -254,6 +254,13 @@ class PagureFlaskForktests(tests.Modeltests): self.assertIn( 'title="View file as of 2a552b">sources', output.data) + # Test if the `open changed file icon` is displayed. + self.assertIn( + 'class="open_changed_file_icon_wrap">' + '', output.data) + @patch('pagure.lib.notify.send_email') def test_merge_request_pull_FF(self, send_email): """ Test the merge_request_pull endpoint with a FF PR. """ @@ -1422,6 +1429,12 @@ index 0000000..2a552bb output.data) self.assertIn('

Test Initial Comment

', output.data) + # Test if the `open changed file icon` is displayed. + self.assertIn( + 'class="open_changed_file_icon_wrap">' + '', output.data) # Case 2 - Add an empty initial comment data = {