Skip to content

Commit 1b745bf

Browse files
committed
remove: extra fixtures data
1 parent 36edb24 commit 1b745bf

File tree

3 files changed

+3
-61
lines changed

3 files changed

+3
-61
lines changed

test/fixtures/auth/githubUserInfo.js

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -101,49 +101,5 @@ module.exports = () => {
101101
created_at: "2020-09-06T16:21:38Z",
102102
updated_at: "2023-07-26T09:29:37Z",
103103
},
104-
{
105-
id: "86847625",
106-
nodeId: "MDQ6VXNlcjg2ODQ3NjI1",
107-
displayName: "Ravi kumar",
108-
username: "ravikumar1002",
109-
profileUrl: "https://github.com/ravikumar1002",
110-
photos: [{ value: "https://avatars.githubusercontent.com/u/86847625?v=4" }],
111-
provider: "github",
112-
_raw: '{"login":"ravikumar1002","id":86847625,"node_id":"MDQ6VXNlcjg2ODQ3NjI1","avatar_url":"https://avatars.githubusercontent.com/u/86847625?v=4","gravatar_id":"","url":"https://api.github.com/users/ravikumar1002","html_url":"https://github.com/ravikumar1002","followers_url":"https://api.github.com/users/ravikumar1002/followers","following_url":"https://api.github.com/users/ravikumar1002/following{/other_user}","gists_url":"https://api.github.com/users/ravikumar1002/gists{/gist_id}","starred_url":"https://api.github.com/users/ravikumar1002/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravikumar1002/subscriptions","organizations_url":"https://api.github.com/users/ravikumar1002/orgs","repos_url":"https://api.github.com/users/ravikumar1002/repos","events_url":"https://api.github.com/users/ravikumar1002/events{/privacy}","received_events_url":"https://api.github.com/users/ravikumar1002/received_events","type":"User","site_admin":false,"name":"Ravi kumar","company":null,"blog":"https://ravikumar.dev/","location":"Delhi, India","email":null,"hireable":null,"bio":"Frontend developer","twitter_username":"kumarravi1002","public_repos":47,"public_gists":0,"followers":9,"following":13,"created_at":"2021-07-02T16:40:44Z","updated_at":"2023-07-27T00:12:32Z"}',
113-
_json: {
114-
login: "ravikumar1002",
115-
id: 86847625,
116-
node_id: "MDQ6VXNlcjg2ODQ3NjI1",
117-
avatar_url: "https://avatars.githubusercontent.com/u/86847625?v=4",
118-
gravatar_id: "",
119-
url: "https://api.github.com/users/ravikumar1002",
120-
html_url: "https://github.com/ravikumar1002",
121-
followers_url: "https://api.github.com/users/ravikumar1002/followers",
122-
following_url: "https://api.github.com/users/ravikumar1002/following{/other_user}",
123-
gists_url: "https://api.github.com/users/ravikumar1002/gists{/gist_id}",
124-
starred_url: "https://api.github.com/users/ravikumar1002/starred{/owner}{/repo}",
125-
subscriptions_url: "https://api.github.com/users/ravikumar1002/subscriptions",
126-
organizations_url: "https://api.github.com/users/ravikumar1002/orgs",
127-
repos_url: "https://api.github.com/users/ravikumar1002/repos",
128-
events_url: "https://api.github.com/users/ravikumar1002/events{/privacy}",
129-
received_events_url: "https://api.github.com/users/ravikumar1002/received_events",
130-
type: "User",
131-
site_admin: false,
132-
name: "Ravi kumar",
133-
company: null,
134-
blog: "https://ravikumar.dev/",
135-
location: "Delhi, India",
136-
email: null,
137-
hireable: null,
138-
bio: "Frontend developer",
139-
twitter_username: "kumarravi1002",
140-
public_repos: 47,
141-
public_gists: 0,
142-
followers: 9,
143-
following: 13,
144-
created_at: "2021-07-02T16:40:44Z",
145-
updated_at: "2023-07-27T00:12:32Z",
146-
},
147-
},
148104
];
149105
};

test/fixtures/user/user.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ module.exports = () => {
1919
linkedin_id: "ankurnarkhede",
2020
github_id: githubUserInfo[0].username,
2121
github_display_name: githubUserInfo[0].displayName,
22+
github_created_at: Number(new Date(githubUserInfo[0]._json.created_at).getTime()),
2223
isMember: true,
2324
phone: "1234567890",
2425
@@ -343,20 +344,5 @@ module.exports = () => {
343344
updated_at: Date.now(),
344345
created_at: Date.now(),
345346
},
346-
{
347-
username: "ravikumar1002",
348-
first_name: "ravi",
349-
last_name: "kumar",
350-
github_id: githubUserInfo[2].username,
351-
github_display_name: githubUserInfo[2].displayName,
352-
github_created_at: Number(new Date(githubUserInfo[2]._json.created_at).getTime()),
353-
roles: {
354-
member: false,
355-
in_discord: true,
356-
},
357-
incompleteUserDetails: false,
358-
updated_at: Date.now(),
359-
created_at: Date.now(),
360-
},
361347
];
362348
};

test/unit/models/users.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ describe("users", function () {
104104
});
105105

106106
it("It should have github_created_at fields", async function () {
107-
const userData = userDataArray[15];
107+
const userData = userDataArray[0];
108108
await users.addOrUpdate(userData);
109-
const githubUsername = "ravikumar1002";
109+
const githubUsername = "ankur";
110110
const { user } = await users.fetchUser({ githubUsername });
111111
expect(user).to.haveOwnProperty("github_created_at");
112112
});

0 commit comments

Comments
 (0)