|
100 | 100 | error = NULL; |
101 | 101 | }); |
102 | 102 |
|
103 | | - context(@"when -pushBranch: is given invalid parameters", ^{ |
104 | | - it(@"needs a non-nil branch", ^{ |
105 | | - XCTAssertThrowsSpecificNamed([localRepo pushBranch:nil toRemote:remote withOptions:nil error:&error progress:NULL], NSException, NSInternalInconsistencyException, @"should throw NSInternalInconsistencyException"); |
106 | | - }); |
107 | | - |
108 | | - it(@"needs a non-nil remote", ^{ |
109 | | - GTBranch *masterBranch = localBranchWithName(@"master", localRepo); |
110 | | - XCTAssertThrowsSpecificNamed([localRepo pushBranch:masterBranch toRemote:nil withOptions:nil error:&error progress:NULL], NSException, NSInternalInconsistencyException, @"should throw NSInternalInconsistencyException"); |
111 | | - }); |
112 | | - }); |
113 | | - |
114 | | - context(@"when -pushBranches: is given invalid parameters", ^{ |
115 | | - it(@"needs a non-nil branch array", ^{ |
116 | | - XCTAssertThrowsSpecificNamed([localRepo pushBranches:nil toRemote:remote withOptions:nil error:&error progress:NULL], NSException, NSInternalInconsistencyException, @"should throw NSInternalInconsistencyException"); |
117 | | - }); |
118 | | - |
119 | | - it(@"needs a non-empty branch array", ^{ |
120 | | - XCTAssertThrowsSpecificNamed([localRepo pushBranches:@[] toRemote:remote withOptions:nil error:&error progress:NULL], NSException, NSInternalInconsistencyException, @"should throw NSInternalInconsistencyException"); |
121 | | - }); |
122 | | - |
123 | | - it(@"needs a non-nil remote", ^{ |
124 | | - GTBranch *masterBranch = localBranchWithName(@"master", localRepo); |
125 | | - XCTAssertThrowsSpecificNamed([localRepo pushBranches:@[masterBranch] toRemote:nil withOptions:nil error:&error progress:NULL], NSException, NSInternalInconsistencyException, @"should throw NSInternalInconsistencyException"); |
126 | | - }); |
127 | | - }); |
128 | | - |
129 | 103 | context(@"when the local and remote branches are in sync", ^{ |
130 | 104 | it(@"should push no commits", ^{ |
131 | 105 | GTBranch *masterBranch = localBranchWithName(@"master", localRepo); |
|
0 commit comments