refactor use cases
This commit is contained in:
@@ -17,7 +17,7 @@ describe('GetDashboardDataPresenter', () => {
|
||||
totalLeagues: 5,
|
||||
};
|
||||
|
||||
presenter.present(output);
|
||||
presenter.transform(output);
|
||||
|
||||
expect(presenter.getResponseModel()).toEqual({
|
||||
totalUsers: 100,
|
||||
@@ -33,11 +33,11 @@ describe('GetDashboardDataPresenter', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('getResponseModel throws if not presented', () => {
|
||||
expect(() => presenter.getResponseModel()).toThrow('Presenter not presented');
|
||||
it('getResponseModel throws if not transformed', () => {
|
||||
expect(() => presenter.getResponseModel()).toThrow('Presenter not transformed');
|
||||
});
|
||||
|
||||
it('responseModel throws if not presented', () => {
|
||||
expect(() => presenter.responseModel).toThrow('Presenter not presented');
|
||||
it('responseModel throws if not transformed', () => {
|
||||
expect(() => presenter.responseModel).toThrow('Presenter not transformed');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user