Skip to content

Commit

Permalink
refactor(EditorControllerTest.java): Changed feed source to one that …
Browse files Browse the repository at this point in the history
…has less test data
  • Loading branch information
Robin Beer authored and Robin Beer committed Jul 20, 2023
1 parent 3cff05e commit 47d1636
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static void setUp() throws Exception {
Persistence.feedSources.create(feedSourceCascadeDelete);

feedVersion = createFeedVersionFromGtfsZip(feedSource, "bart_old.zip");
feedVersionCascadeDelete = createFeedVersionFromGtfsZip(feedSourceCascadeDelete, "bart_old.zip");
feedVersionCascadeDelete = createFeedVersionFromGtfsZip(feedSourceCascadeDelete, "caltrain_gtfs_lite.zip");

// Create and run snapshot jobs
crateAndRunSnapshotJob(feedVersion.name, feedSource.id, feedVersion.namespace);
Expand Down Expand Up @@ -172,15 +172,15 @@ public void canPatchStopsConditionally() throws IOException {
void canCascadeDeleteStop() throws IOException, SQLException {
// Get a fresh feed source so that the editor namespace was updated after snapshot.
FeedSource freshFeedSource = Persistence.feedSources.getById(feedVersionCascadeDelete.feedSourceId);
String stopId = "WARM";
String stopId = "Bayshore Caltrain";
String stopCountSql = getCountSql(freshFeedSource.editorNamespace, "stops", stopId);
String stopTimesCountSql = getCountSql(freshFeedSource.editorNamespace, "stop_times", stopId);
String patternStopsCountSql = getCountSql(freshFeedSource.editorNamespace, "pattern_stops", stopId);

// Check for presence of stopId in stops, stop times and pattern stops.
assertThatSqlCountQueryYieldsExpectedCount(stopCountSql, 1);
assertThatSqlCountQueryYieldsExpectedCount(stopTimesCountSql, 522);
assertThatSqlCountQueryYieldsExpectedCount(patternStopsCountSql, 4);
assertThatSqlCountQueryYieldsExpectedCount(stopTimesCountSql, 1);
assertThatSqlCountQueryYieldsExpectedCount(patternStopsCountSql, 1);

String path = String.format(
"/api/editor/secure/stop/%s/cascadeDeleteStop?feedId=%s&sessionId=test",
Expand Down

0 comments on commit 47d1636

Please sign in to comment.