/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to tests/test_commit.py

  • Committer: John Arbash Meinel
  • Date: 2007-10-30 21:16:58 UTC
  • mto: (330.3.3 trunk)
  • mto: This revision was merged to the branch mainline in revision 368.
  • Revision ID: john@arbash-meinel.com-20071030211658-95ga7flkuhal4w28
Add tests that when per-file messages are disabled
we use 'Commit Message' rather than 'Global Commit Message'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
840
840
 
841
841
        dlg = commit.CommitDialog(tree)
842
842
        self.assertFalse(dlg._file_message_expander.get_property('visible'))
 
843
        self.assertEqual('Commit Message',
 
844
                         dlg._global_message_label.get_text())
843
845
 
844
846
        tree.branch.get_config().set_user_option('per_file_commits', 'true')
845
847
        dlg = commit.CommitDialog(tree)
846
848
        self.assertTrue(dlg._file_message_expander.get_property('visible'))
 
849
        self.assertEqual('Global Commit Message',
 
850
                         dlg._global_message_label.get_text())
847
851
 
848
852
        tree.branch.get_config().set_user_option('per_file_commits', 'on')
849
853
        dlg = commit.CommitDialog(tree)
850
854
        self.assertTrue(dlg._file_message_expander.get_property('visible'))
 
855
        self.assertEqual('Global Commit Message',
 
856
                         dlg._global_message_label.get_text())
851
857
 
852
858
        tree.branch.get_config().set_user_option('per_file_commits', 'y')
853
859
        dlg = commit.CommitDialog(tree)
854
860
        self.assertTrue(dlg._file_message_expander.get_property('visible'))
 
861
        self.assertEqual('Global Commit Message',
 
862
                         dlg._global_message_label.get_text())
855
863
 
856
864
        tree.branch.get_config().set_user_option('per_file_commits', 'n')
857
865
        dlg = commit.CommitDialog(tree)
858
866
        self.assertFalse(dlg._file_message_expander.get_property('visible'))
 
867
        self.assertEqual('Commit Message',
 
868
                         dlg._global_message_label.get_text())
859
869
 
860
870
    def test_commit_specific_files_with_messages(self):
861
871
        tree = self.make_branch_and_tree('tree')