summaryrefslogtreecommitdiff
path: root/spec/javascripts/pipelines/pipelines_table_row_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/javascripts/pipelines/pipelines_table_row_spec.js')
-rw-r--r--spec/javascripts/pipelines/pipelines_table_row_spec.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/javascripts/pipelines/pipelines_table_row_spec.js b/spec/javascripts/pipelines/pipelines_table_row_spec.js
index d5b9e68cc51..b3cbf9aba48 100644
--- a/spec/javascripts/pipelines/pipelines_table_row_spec.js
+++ b/spec/javascripts/pipelines/pipelines_table_row_spec.js
@@ -23,10 +23,11 @@ describe('Pipelines Table Row', () => {
preloadFixtures(jsonFixtureName);
beforeEach(() => {
- const pipelines = getJSONFixture(jsonFixtureName).pipelines; // sorted by id, descending
- pipeline = pipelines[2];
- pipelineWithoutAuthor = pipelines[1];
- pipelineWithoutCommit = pipelines[0];
+ const pipelines = getJSONFixture(jsonFixtureName).pipelines;
+
+ pipeline = pipelines.find(p => p.user !== null && p.commit !== null);
+ pipelineWithoutAuthor = pipelines.find(p => p.user == null && p.commit !== null);
+ pipelineWithoutCommit = pipelines.find(p => p.user == null && p.commit == null);
});
afterEach(() => {