Skip to content

Commit f37d97e

Browse files
committed
Update tests.
1 parent 93c6373 commit f37d97e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

ObjectiveGitTests/GTSubmoduleSpec.m

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@
9393
expect(@(success)).to(beTruthy());
9494
});
9595

96+
it(@"should update the ignore rule", ^{
97+
GTSubmodule *submodule = [repo submoduleWithName:@"Test_App" error:NULL];
98+
expect(submodule).notTo(beNil());
99+
expect(@(submodule.ignoreRule)).to(equal(@(GTSubmoduleIgnoreNone)));
100+
101+
submodule = [submodule submoduleByUpdatingIgnoreRule:GTSubmoduleIgnoreAll error:NULL];
102+
expect(@(submodule.ignoreRule)).to(equal(@(GTSubmoduleIgnoreAll)));
103+
});
104+
96105
describe(@"clean, checked out submodule", ^{
97106
__block GTSubmodule *submodule;
98107

@@ -204,13 +213,11 @@
204213
});
205214

206215
it(@"should honor the ignore rule", ^{
207-
submodule.ignoreRule = GTSubmoduleIgnoreDirty;
208-
209216
GTSubmoduleStatus expectedStatus =
210217
GTSubmoduleStatusExistsInHEAD | GTSubmoduleStatusExistsInIndex | GTSubmoduleStatusExistsInConfig | GTSubmoduleStatusExistsInWorkingDirectory |
211218
GTSubmoduleStatusModifiedInIndex | GTSubmoduleStatusModifiedInWorkingDirectory;
212219

213-
expect(@([submodule status:NULL])).to(equal(@(expectedStatus)));
220+
expect(@([submodule statusWithIgnoreRule:GTSubmoduleIgnoreDirty error:NULL])).to(equal(@(expectedStatus)));
214221
});
215222

216223
it(@"should open a repository" ,^{

0 commit comments

Comments
 (0)