~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/workingtree_implementations/test_commit.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
 
90
90
    def test_commit_sets_last_revision(self):
91
91
        tree = self.make_branch_and_tree('tree')
92
 
        tree.commit('foo', rev_id='foo', allow_pointless=True)
 
92
        committed_id = tree.commit('foo', rev_id='foo', allow_pointless=True)
93
93
        self.assertEqual('foo', tree.last_revision())
 
94
        # the commit should have returned the same id we asked for.
 
95
        self.assertEqual('foo', committed_id)
 
96
 
 
97
    def test_commit_returns_revision_id(self):
 
98
        tree = self.make_branch_and_tree('.')
 
99
        committed_id = tree.commit('message', allow_pointless=True)
 
100
        self.assertTrue(tree.branch.repository.has_revision(committed_id))
 
101
        self.assertNotEqual(None, committed_id)
94
102
 
95
103
    def test_commit_local_unbound(self):
96
104
        # using the library api to do a local commit on unbound branches is