ChangeIT: Fix calls to exception.expect(...)
The tests were calling exception.equals(...) which compiles without any warning, but is obviously wrong. Change-Id: I34a51bb2916ebf183dc35352d622211e5aa5f19f
This commit is contained in:
@@ -282,7 +282,7 @@ public class ChangeIT extends AbstractDaemonTest {
|
||||
assertThat(committer.email).isEqualTo(admin.email);
|
||||
|
||||
// Rebasing the second change again should fail
|
||||
exception.equals(ResourceConflictException.class);
|
||||
exception.expect(ResourceConflictException.class);
|
||||
exception.expectMessage("Change is already up to date");
|
||||
gApi.changes()
|
||||
.id(changeId)
|
||||
@@ -345,7 +345,7 @@ public class ChangeIT extends AbstractDaemonTest {
|
||||
@Test
|
||||
public void rebaseUpToDateChange() throws Exception {
|
||||
PushOneCommit.Result r = createChange();
|
||||
exception.equals(ResourceConflictException.class);
|
||||
exception.expect(ResourceConflictException.class);
|
||||
exception.expectMessage("Change is already up to date");
|
||||
gApi.changes()
|
||||
.id(r.getChangeId())
|
||||
|
Reference in New Issue
Block a user