From e524e5558d7ae0410254c44c304560be6b22394f Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Mon, 6 May 2019 14:18:02 +0100 Subject: [PATCH] Add more test fixtures --- tests/fixtures/contributions.js | 18 ++++++++++++++++++ tests/fixtures/contributors.js | 6 +++--- 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 tests/fixtures/contributions.js diff --git a/tests/fixtures/contributions.js b/tests/fixtures/contributions.js new file mode 100644 index 0000000..1d92d92 --- /dev/null +++ b/tests/fixtures/contributions.js @@ -0,0 +1,18 @@ +import Model from 'kredits-web/models/contribution'; + +const items = []; + +const data = [ + { id: 1, contributorId: 1, confirmedAtBlock: 1000, claimed: false, vetoed: false, amount: 1500 }, + { id: 2, contributorId: 1, confirmedAtBlock: 1000, claimed: false, vetoed: false, amount: 5000 }, + { id: 3, contributorId: 2, confirmedAtBlock: 1000, claimed: false, vetoed: false, amount: 1500 }, + { id: 4, contributorId: 2, confirmedAtBlock: 1000, claimed: false, vetoed: false, amount: 1500 }, + { id: 5, contributorId: 1, confirmedAtBlock: 1000, claimed: false, vetoed: false, amount: 5000 }, + { id: 6, contributorId: 3, confirmedAtBlock: 2000, claimed: false, vetoed: false, amount: 5000 }, + { id: 7, contributorId: 1, confirmedAtBlock: 2000, claimed: false, vetoed: false, amount: 1500 }, + { id: 8, contributorId: 3, confirmedAtBlock: 2000, claimed: false, vetoed: true, amount: 1500 }, +]; + +data.forEach(attrs => items.push(Model.create(attrs))); + +export default items; diff --git a/tests/fixtures/contributors.js b/tests/fixtures/contributors.js index 12f8f40..a8f24b0 100644 --- a/tests/fixtures/contributors.js +++ b/tests/fixtures/contributors.js @@ -3,9 +3,9 @@ import Contributor from 'kredits-web/models/contributor'; const contributors = []; const data = [ - { id: 1, name: 'Bumi', totalKreditsEarned: 5500 }, - { id: 2, name: 'Râu Cao', totalKreditsEarned: 1500 }, - { id: 3, name: 'Manuel', totalKreditsEarned: 3000 } + { id: 1, name: 'Bumi', totalKreditsEarned: 11500 }, + { id: 2, name: 'Râu Cao', totalKreditsEarned: 3000 }, + { id: 3, name: 'Manuel', totalKreditsEarned: 0 } ]; data.forEach(attrs => contributors.push(Contributor.create(attrs)));