Skip to content

Commit

Permalink
Properly classify model removals as breaking (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg authored Aug 31, 2022
1 parent 3279b97 commit 6d32d0d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Resources/ExampleDocuments/migration_guide.json
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@
{
"type": "removal",
"id": "CategoryStatus",
"breaking": false,
"breaking": true,
"solvable": false
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ struct ModelsComparator: Comparator {

for removal in removalCandidates where !pairs.contains(where: { $0.contains(removal.deltaIdentifier) }) {
results.append(.removal(
id: removal.deltaIdentifier,
breaking: false
id: removal.deltaIdentifier
))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ final class ModelsComparatorTests: ApodiniMigratorXCTestCase {
let change = try XCTUnwrap(modelChanges.first)
XCTAssertEqual(change.id, programmingLanguages.deltaIdentifier)
XCTAssertEqual(change.type, .removal)
XCTAssertEqual(change.breaking, false)
XCTAssertEqual(change.breaking, true)
XCTAssertEqual(change.solvable, false)

let removalChange = try XCTUnwrap(change.modeledRemovalChange)
Expand Down

0 comments on commit 6d32d0d

Please sign in to comment.