-
-
Notifications
You must be signed in to change notification settings - Fork 657
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2eb0b6a
commit 817f960
Showing
3 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { ICustomRole } from 'lib/types/model'; | ||
import { ICustomRoleInsert, IRoleStore } from 'lib/types/stores/role-store'; | ||
import { | ||
IUserFeedback, | ||
IUserFeedbackKey, | ||
IUserFeedbackStore, | ||
} from '../../lib/types/stores/user-feedback-store'; | ||
|
||
export default class FakeRoleStore implements IRoleStore { | ||
async get(key: number): Promise<ICustomRole> { | ||
return Promise.resolve({ | ||
id: 1, | ||
name: 'Role', | ||
description: 'Hello', | ||
createdAt: new Date(), | ||
}); | ||
} | ||
async getAll(): Promise<ICustomRole[]> { | ||
return Promise.resolve([ | ||
{ | ||
id: 1, | ||
name: 'Role', | ||
description: 'Hello', | ||
createdAt: new Date(), | ||
}, | ||
]); | ||
} | ||
|
||
async exists(): Promise<boolean> { | ||
return Promise.resolve(true); | ||
} | ||
|
||
create(role: ICustomRoleInsert): Promise<ICustomRole> { | ||
return Promise.resolve({ | ||
id: 1, | ||
name: 'Role', | ||
description: 'Hello', | ||
createdAt: new Date(), | ||
}); | ||
} | ||
|
||
delete(id: number): Promise<void> { | ||
return Promise.resolve(); | ||
} | ||
|
||
destroy(): Promise<void> { | ||
return Promise.resolve(); | ||
} | ||
|
||
deleteAll(): Promise<void> { | ||
return Promise.resolve(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters