Skip to content

src/campaign: Cache list endpoint #684

src/campaign: Cache list endpoint

src/campaign: Cache list endpoint #684

GitHub Actions / JEST Tests succeeded Nov 29, 2023 in 1s

JEST Tests ✅

Tests passed successfully

✅ test-results.xml

123 tests were completed in 138s with 123 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
AffiliateService 1✅ 388ms
AppController 1✅ 509ms
AppService 1✅ 346ms
BankaccountService 1✅ 342ms
BenefactorController 1✅ 712ms
BenefactorService 1✅ 375ms
BeneficiaryController 8✅ 2s
BeneficiaryService 1✅ 369ms
CampaignFileController 4✅ 2s
CampaignFileController 4✅ 2s
CampaignTypesController 7✅ 799ms
CampaignTypesService 1✅ 368ms
CityController 7✅ 2s
CityService 1✅ 411ms
CompanyController 1✅ 584ms
CompanyService 1✅ 1s
CoordinatorController 5✅ 2s
CoordinatorService 4✅ 2s
CountryController 8✅ 835ms
CountryService 1✅ 1s
DonationWishController 1✅ 756ms
DonationWishService 1✅ 364ms
EmailService enabled 7✅ 815ms
ExpensesController 7✅ 2s
ExpensesService 1✅ 607ms
HealthController 1✅ 584ms
InfoRequestController 1✅ 3s
InfoRequestService 1✅ 1s
IrregularityController 1✅ 1s
IrregularityFileController 1✅ 3s
IrregularityFileService 1✅ 2s
IrregularityService 1✅ 661ms
OrganizerController 1✅ 663ms
OrganizerService 1✅ 419ms
podkrepiTypes 1✅ 149ms
PrismaService 1✅ 332ms
ProviderLoginController 2✅ 3s
RecurringDonationController 1✅ 870ms
RecurringDonationService 6✅ 867ms
RegisterController 2✅ 1s
SupportController 3✅ 1s
SupportService 1✅ 935ms
TransferController 11✅ 3s
TransferService 1✅ 365ms
VaultController 8✅ 3s
WithdrawalService 1✅ 998ms

✅ AffiliateService

AffiliateService should be defined
  ✅ AffiliateService should be defined

✅ AppController

AppController getData should return "Welcome to Podkrepi.bg Backend API! See Swagger docs at /swagger"
  ✅ AppController getData should return "Welcome to Podkrepi.bg Backend API! See Swagger docs at /swagger"

✅ AppService

AppService getData should return "Welcome to Podkrepi.bg Backend API! See Swagger docs at /swagger"
  ✅ AppService getData should return "Welcome to Podkrepi.bg Backend API! See Swagger docs at /swagger"

✅ BankaccountService

BankaccountService should be defined
  ✅ BankaccountService should be defined

✅ BenefactorController

BenefactorController should be defined
  ✅ BenefactorController should be defined

✅ BenefactorService

BenefactorService should be defined
  ✅ BenefactorService should be defined

✅ BeneficiaryController

BeneficiaryController should be defined
  ✅ BeneficiaryController should be defined
BeneficiaryController should list all beneficiaries in db
  ✅ BeneficiaryController should list all beneficiaries in db
BeneficiaryController should get one beneficiary
  ✅ BeneficiaryController should get one beneficiary
BeneficiaryController should throw error if beneficiary does not exist
  ✅ BeneficiaryController should throw error if beneficiary does not exist
BeneficiaryController it should create beneficiary
  ✅ BeneficiaryController it should create beneficiary
BeneficiaryController it should update beneficiary
  ✅ BeneficiaryController it should update beneficiary
BeneficiaryController should remove one item
  ✅ BeneficiaryController should remove one item
BeneficiaryController it should create beneficiary as company
  ✅ BeneficiaryController it should create beneficiary as company

✅ BeneficiaryService

BeneficiaryService should be defined
  ✅ BeneficiaryService should be defined

✅ CampaignFileController

CampaignFileController should be defined
  ✅ CampaignFileController should be defined
CampaignFileController should call service for create campaign file for admin user
  ✅ CampaignFileController should call service for create campaign file for admin user
CampaignFileController should throw an error for missing person
  ✅ CampaignFileController should throw an error for missing person
CampaignFileController should throw an error for user not owning updated campaign
  ✅ CampaignFileController should throw an error for user not owning updated campaign

✅ CampaignFileController

CampaignFileController should be defined
  ✅ CampaignFileController should be defined
CampaignFileController should call service for create campaign file for admin user
  ✅ CampaignFileController should call service for create campaign file for admin user
CampaignFileController should throw an error for missing person
  ✅ CampaignFileController should throw an error for missing person
CampaignFileController should throw an error for user not having access
  ✅ CampaignFileController should throw an error for user not having access

✅ CampaignTypesController

CampaignTypesController should be defined
  ✅ CampaignTypesController should be defined
CampaignTypesController should list all campaign types in db
  ✅ CampaignTypesController should list all campaign types in db
CampaignTypesController should get one campaign type
  ✅ CampaignTypesController should get one campaign type
CampaignTypesController should throw error if campaign type does not exist
  ✅ CampaignTypesController should throw error if campaign type does not exist
CampaignTypesController it should create campaign type
  ✅ CampaignTypesController it should create campaign type
CampaignTypesController it should update campaign type
  ✅ CampaignTypesController it should update campaign type
CampaignTypesController should remove one item
  ✅ CampaignTypesController should remove one item

✅ CampaignTypesService

CampaignTypesService should be defined
  ✅ CampaignTypesService should be defined

✅ CityController

CityController should be defined
  ✅ CityController should be defined
CityController should list all cities
  ✅ CityController should list all cities
CityController should get 1 city
  ✅ CityController should get 1 city
CityController should throw error if city does not exist
  ✅ CityController should throw error if city does not exist
CityController should create a city
  ✅ CityController should create a city
CityController should update a city
  ✅ CityController should update a city
CityController should remove 1 city
  ✅ CityController should remove 1 city

✅ CityService

CityService should be defined
  ✅ CityService should be defined

✅ CompanyController

CompanyController should be defined
  ✅ CompanyController should be defined

✅ CompanyService

CompanyService should be defined
  ✅ CompanyService should be defined

✅ CoordinatorController

CoordinatorController should be defined
  ✅ CoordinatorController should be defined
CoordinatorController getData should list all coordinators
  ✅ CoordinatorController getData should list all coordinators
CoordinatorController getData should get one city
  ✅ CoordinatorController getData should get one city
CoordinatorController create should create new coordinator
  ✅ CoordinatorController create should create new coordinator
CoordinatorController delete should update coordinator
  ✅ CoordinatorController delete should update coordinator

✅ CoordinatorService

CoordinatorService should be defined
  ✅ CoordinatorService should be defined
CoordinatorService should return all
  ✅ CoordinatorService should return all
CoordinatorService Find one should return searching coordinator
  ✅ CoordinatorService Find one should return searching coordinator
CoordinatorService delete should delete
  ✅ CoordinatorService delete should delete

✅ CountryController

CountryController should be defined
  ✅ CountryController should be defined
CountryController should list all countries
  ✅ CountryController should list all countries
CountryController should get 1 country
  ✅ CountryController should get 1 country
CountryController should throw error if trying to get a country that does not exist
  ✅ CountryController should throw error if trying to get a country that does not exist
CountryController should create a country
  ✅ CountryController should create a country
CountryController should update a country
  ✅ CountryController should update a country
CountryController should throw error if trying to update a country that does not exist
  ✅ CountryController should throw error if trying to update a country that does not exist
CountryController should remove a country
  ✅ CountryController should remove a country

✅ CountryService

CountryService should be defined
  ✅ CountryService should be defined

✅ DonationWishController

DonationWishController should be defined
  ✅ DonationWishController should be defined

✅ DonationWishService

DonationWishService should be defined
  ✅ DonationWishService should be defined

✅ EmailService enabled

EmailService enabled  should be defined
  ✅ EmailService enabled  should be defined
EmailService enabled  send() should send email successfully
  ✅ EmailService enabled  send() should send email successfully
EmailService enabled  sendFromTemplate() should send email successfully
  ✅ EmailService enabled  sendFromTemplate() should send email successfully
EmailService enabled  sendFromTemplate() should send email successfully with default sender
  ✅ EmailService enabled  sendFromTemplate() should send email successfully with default sender
EmailService enabled  sendFromTemplate() should throw error for missing recipient
  ✅ EmailService enabled  sendFromTemplate() should throw error for missing recipient
EmailService disabled  should be defined
  ✅ EmailService disabled  should be defined
EmailService disabled  send() should not send email if service is not enabled
  ✅ EmailService disabled  send() should not send email if service is not enabled

✅ ExpensesController

ExpensesController should be defined
  ✅ ExpensesController should be defined
ExpensesController create and update data should create an expense
  ✅ ExpensesController create and update data should create an expense
ExpensesController create and update data should not create an expense with insufficient balance
  ✅ ExpensesController create and update data should not create an expense with insufficient balance
ExpensesController create and update data should update an expense, when it is approved
  ✅ ExpensesController create and update data should update an expense, when it is approved
ExpensesController create and update data should raise an exception, since the user is not authorized
  ✅ ExpensesController create and update data should raise an exception, since the user is not authorized
ExpensesController create and update data should not update a withdrawal, when it is already approved/cancelled
  ✅ ExpensesController create and update data should not update a withdrawal, when it is already approved/cancelled
ExpensesController create and update data should not update an expense, when its vault is being changed
  ✅ ExpensesController create and update data should not update an expense, when its vault is being changed

✅ ExpensesService

ExpensesService should be defined
  ✅ ExpensesService should be defined

✅ HealthController

HealthController should be defined
  ✅ HealthController should be defined

✅ InfoRequestController

InfoRequestController should be defined
  ✅ InfoRequestController should be defined

✅ InfoRequestService

InfoRequestService should be defined
  ✅ InfoRequestService should be defined

✅ IrregularityController

IrregularityController should be defined
  ✅ IrregularityController should be defined

✅ IrregularityFileController

IrregularityFileController should be defined
  ✅ IrregularityFileController should be defined

✅ IrregularityFileService

IrregularityFileService should be defined
  ✅ IrregularityFileService should be defined

✅ IrregularityService

IrregularityService should be defined
  ✅ IrregularityService should be defined

✅ OrganizerController

OrganizerController should be defined
  ✅ OrganizerController should be defined

✅ OrganizerService

OrganizerService should be defined
  ✅ OrganizerService should be defined

✅ podkrepiTypes

podkrepiTypes should work
  ✅ podkrepiTypes should work

✅ PrismaService

PrismaService should be defined
  ✅ PrismaService should be defined

✅ ProviderLoginController

ProviderLoginController should be defined
  ✅ ProviderLoginController should be defined
ProviderLoginController refreshToken should call refreshToken
  ✅ ProviderLoginController refreshToken should call refreshToken

✅ RecurringDonationController

RecurringDonationController should be defined
  ✅ RecurringDonationController should be defined

✅ RecurringDonationService

RecurringDonationService should be defined
  ✅ RecurringDonationService should be defined
RecurringDonationService should return all recurring donations
  ✅ RecurringDonationService should return all recurring donations
RecurringDonationService should return a recurring donation by id
  ✅ RecurringDonationService should return a recurring donation by id
RecurringDonationService should call stripe cancel service my subscription id
  ✅ RecurringDonationService should call stripe cancel service my subscription id
RecurringDonationService should cancel a subscription in db
  ✅ RecurringDonationService should cancel a subscription in db
RecurringDonationService should create  a subscription in db
  ✅ RecurringDonationService should create  a subscription in db

✅ RegisterController

RegisterController should be defined
  ✅ RegisterController should be defined
RegisterController createUser should call createUser
  ✅ RegisterController createUser should call createUser

✅ SupportController

SupportController should be defined
  ✅ SupportController should be defined
SupportController getSuporters should list all supporters in db
  ✅ SupportController getSuporters should list all supporters in db
SupportController getInfoRequests should list all info requests in db
  ✅ SupportController getInfoRequests should list all info requests in db

✅ SupportService

SupportService should be defined
  ✅ SupportService should be defined

✅ TransferController

TransferController should be defined
  ✅ TransferController should be defined
TransferController should list all transfers
  ✅ TransferController should list all transfers
TransferController should get 1 transfer
  ✅ TransferController should get 1 transfer
TransferController should throw an error if a transfer does not exist
  ✅ TransferController should throw an error if a transfer does not exist
TransferController create and update data should create a transfer
  ✅ TransferController create and update data should create a transfer
TransferController create and update data should not create a transfer with insufficient balance
  ✅ TransferController create and update data should not create a transfer with insufficient balance
TransferController create and update data should update a transfer, when it is approved
  ✅ TransferController create and update data should update a transfer, when it is approved
TransferController create and update data should update a transfer, when it is declined
  ✅ TransferController create and update data should update a transfer, when it is declined
TransferController create and update data should not update a transfer, when it is already approved/declined/cancelled
  ✅ TransferController create and update data should not update a transfer, when it is already approved/declined/cancelled
TransferController create and update data should not update a transfer, when its source vault is being changed
  ✅ TransferController create and update data should not update a transfer, when its source vault is being changed
TransferController removeData should not remove transfers
  ✅ TransferController removeData should not remove transfers

✅ TransferService

TransferService should be defined
  ✅ TransferService should be defined

✅ VaultController

VaultController should be defined
  ✅ VaultController should be defined
VaultController should call create
  ✅ VaultController should call create
VaultController should not call create if user is not the owner
  ✅ VaultController should not call create if user is not the owner
VaultController should call update
  ✅ VaultController should call update
VaultController should not call update if user is not owner
  ✅ VaultController should not call update if user is not owner
VaultController should call remove on empty vaults
  ✅ VaultController should call remove on empty vaults
VaultController should not call remove on non-empty vaults
  ✅ VaultController should not call remove on non-empty vaults
VaultController should not call remove in user is not owner
  ✅ VaultController should not call remove in user is not owner

✅ WithdrawalService

WithdrawalService should be defined
  ✅ WithdrawalService should be defined