Skip to content

Commit

Permalink
TEMP
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 committed Jan 17, 2025
1 parent 00e5745 commit 400fa6c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
10 changes: 5 additions & 5 deletions tests/acceptance/api-token-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,32 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
import { visit } from '../helpers/visit-ignoring-abort';

module('Acceptance | api-tokens', function (hooks) {
setupApplicationTest(hooks);
setupApplicationTest(hooks, { msw: true });

function prepare(context) {
let user = context.server.create('user', {
let user = context.db.user.create({
login: 'johnnydee',
name: 'John Doe',
email: '[email protected]',
avatar: 'https://avatars2.githubusercontent.com/u/1234567?v=4',
});

context.server.create('api-token', {
context.db.apiToken.create({
user,
name: 'foo',
createdAt: '2017-08-01T12:34:56',
lastUsedAt: '2017-11-02T01:45:14',
});

context.server.create('api-token', {
context.db.apiToken.create({
user,
name: 'BAR',
createdAt: '2017-11-19T17:59:22',
lastUsedAt: null,
expiredAt: '2017-12-19T17:59:22',
});

context.server.create('api-token', {
context.db.apiToken.create({
user,
name: 'recently expired',
createdAt: '2017-08-01T12:34:56',
Expand Down
5 changes: 3 additions & 2 deletions tests/acceptance/front-page-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ import { summary } from '../../mirage/route-handlers/summary';
import axeConfig from '../axe-config';

module('Acceptance | front page', function (hooks) {
setupApplicationTest(hooks);
setupApplicationTest(hooks, { msw: true });

test('visiting /', async function (assert) {
this.owner.lookup('service:intl').locale = 'en';

this.server.loadFixtures();
this.db.user.create({ name: 'SimonSays' });
// this.server.loadFixtures();

await visit('/');

Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/readme-rendering-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ graph TD;
`;

module('Acceptance | README rendering', function (hooks) {
setupApplicationTest(hooks);
setupApplicationTest(hooks, { msw: true });

test('it works', async function (assert) {
let crate = this.server.create('crate', { name: 'serde' });
Expand Down

0 comments on commit 400fa6c

Please sign in to comment.