Skip to content

Commit 5266fb2

Browse files
authored
test: add a bunch more EntityInfo tests (#590)
* Add another entity info test * test: add a bunch more EntityInfo tests * test: add test for no http in blog * test: add no required keys test
1 parent 3714dc5 commit 5266fb2

4 files changed

Lines changed: 485 additions & 13 deletions

File tree

__tests__/data/api/user.js

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,168 @@ export default {
3030
created_at: '2008-01-14T04:33:35Z',
3131
updated_at: '2008-01-14T04:33:35Z',
3232
};
33+
34+
export const noCompany = {
35+
login: 'octocat',
36+
id: 1,
37+
avatar_url: 'https://github.com/images/error/octocat_happy.gif',
38+
gravatar_id: '',
39+
url: 'https://api.github.com/users/octocat',
40+
html_url: 'https://github.com/octocat',
41+
followers_url: 'https://api.github.com/users/octocat/followers',
42+
following_url: 'https://api.github.com/users/octocat/following{/other_user}',
43+
gists_url: 'https://api.github.com/users/octocat/gists{/gist_id}',
44+
starred_url: 'https://api.github.com/users/octocat/starred{/owner}{/repo}',
45+
subscriptions_url: 'https://api.github.com/users/octocat/subscriptions',
46+
organizations_url: 'https://api.github.com/users/octocat/orgs',
47+
repos_url: 'https://api.github.com/users/octocat/repos',
48+
events_url: 'https://api.github.com/users/octocat/events{/privacy}',
49+
received_events_url: 'https://api.github.com/users/octocat/received_events',
50+
type: 'User',
51+
site_admin: false,
52+
name: 'monalisa octocat',
53+
company: '',
54+
blog: 'https://github.com/blog',
55+
location: 'San Francisco',
56+
57+
hireable: false,
58+
bio: 'There once was...',
59+
public_repos: 2,
60+
public_gists: 1,
61+
followers: 20,
62+
following: 0,
63+
created_at: '2008-01-14T04:33:35Z',
64+
updated_at: '2008-01-14T04:33:35Z',
65+
};
66+
67+
export const noTaggedCompany = {
68+
login: 'octocat',
69+
id: 1,
70+
avatar_url: 'https://github.com/images/error/octocat_happy.gif',
71+
gravatar_id: '',
72+
url: 'https://api.github.com/users/octocat',
73+
html_url: 'https://github.com/octocat',
74+
followers_url: 'https://api.github.com/users/octocat/followers',
75+
following_url: 'https://api.github.com/users/octocat/following{/other_user}',
76+
gists_url: 'https://api.github.com/users/octocat/gists{/gist_id}',
77+
starred_url: 'https://api.github.com/users/octocat/starred{/owner}{/repo}',
78+
subscriptions_url: 'https://api.github.com/users/octocat/subscriptions',
79+
organizations_url: 'https://api.github.com/users/octocat/orgs',
80+
repos_url: 'https://api.github.com/users/octocat/repos',
81+
events_url: 'https://api.github.com/users/octocat/events{/privacy}',
82+
received_events_url: 'https://api.github.com/users/octocat/received_events',
83+
type: 'User',
84+
site_admin: false,
85+
name: 'monalisa octocat',
86+
company: 'GitHub HQ',
87+
blog: 'https://github.com/blog',
88+
location: 'San Francisco',
89+
90+
hireable: false,
91+
bio: 'There once was...',
92+
public_repos: 2,
93+
public_gists: 1,
94+
followers: 20,
95+
following: 0,
96+
created_at: '2008-01-14T04:33:35Z',
97+
updated_at: '2008-01-14T04:33:35Z',
98+
};
99+
100+
export const noLocation = {
101+
login: 'octocat',
102+
id: 1,
103+
avatar_url: 'https://github.com/images/error/octocat_happy.gif',
104+
gravatar_id: '',
105+
url: 'https://api.github.com/users/octocat',
106+
html_url: 'https://github.com/octocat',
107+
followers_url: 'https://api.github.com/users/octocat/followers',
108+
following_url: 'https://api.github.com/users/octocat/following{/other_user}',
109+
gists_url: 'https://api.github.com/users/octocat/gists{/gist_id}',
110+
starred_url: 'https://api.github.com/users/octocat/starred{/owner}{/repo}',
111+
subscriptions_url: 'https://api.github.com/users/octocat/subscriptions',
112+
organizations_url: 'https://api.github.com/users/octocat/orgs',
113+
repos_url: 'https://api.github.com/users/octocat/repos',
114+
events_url: 'https://api.github.com/users/octocat/events{/privacy}',
115+
received_events_url: 'https://api.github.com/users/octocat/received_events',
116+
type: 'User',
117+
site_admin: false,
118+
name: 'monalisa octocat',
119+
company: '@GitHub',
120+
blog: 'https://github.com/blog',
121+
location: '',
122+
123+
hireable: false,
124+
bio: 'There once was...',
125+
public_repos: 2,
126+
public_gists: 1,
127+
followers: 20,
128+
following: 0,
129+
created_at: '2008-01-14T04:33:35Z',
130+
updated_at: '2008-01-14T04:33:35Z',
131+
};
132+
133+
export const noEmail = {
134+
login: 'octocat',
135+
id: 1,
136+
avatar_url: 'https://github.com/images/error/octocat_happy.gif',
137+
gravatar_id: '',
138+
url: 'https://api.github.com/users/octocat',
139+
html_url: 'https://github.com/octocat',
140+
followers_url: 'https://api.github.com/users/octocat/followers',
141+
following_url: 'https://api.github.com/users/octocat/following{/other_user}',
142+
gists_url: 'https://api.github.com/users/octocat/gists{/gist_id}',
143+
starred_url: 'https://api.github.com/users/octocat/starred{/owner}{/repo}',
144+
subscriptions_url: 'https://api.github.com/users/octocat/subscriptions',
145+
organizations_url: 'https://api.github.com/users/octocat/orgs',
146+
repos_url: 'https://api.github.com/users/octocat/repos',
147+
events_url: 'https://api.github.com/users/octocat/events{/privacy}',
148+
received_events_url: 'https://api.github.com/users/octocat/received_events',
149+
type: 'User',
150+
site_admin: false,
151+
name: 'monalisa octocat',
152+
company: '@GitHub',
153+
blog: 'https://github.com/blog',
154+
location: 'San Francisco',
155+
email: '',
156+
hireable: false,
157+
bio: 'There once was...',
158+
public_repos: 2,
159+
public_gists: 1,
160+
followers: 20,
161+
following: 0,
162+
created_at: '2008-01-14T04:33:35Z',
163+
updated_at: '2008-01-14T04:33:35Z',
164+
};
165+
166+
export const noHttpInBlog = {
167+
login: 'octocat',
168+
id: 1,
169+
avatar_url: 'https://github.com/images/error/octocat_happy.gif',
170+
gravatar_id: '',
171+
url: 'https://api.github.com/users/octocat',
172+
html_url: 'https://github.com/octocat',
173+
followers_url: 'https://api.github.com/users/octocat/followers',
174+
following_url: 'https://api.github.com/users/octocat/following{/other_user}',
175+
gists_url: 'https://api.github.com/users/octocat/gists{/gist_id}',
176+
starred_url: 'https://api.github.com/users/octocat/starred{/owner}{/repo}',
177+
subscriptions_url: 'https://api.github.com/users/octocat/subscriptions',
178+
organizations_url: 'https://api.github.com/users/octocat/orgs',
179+
repos_url: 'https://api.github.com/users/octocat/repos',
180+
events_url: 'https://api.github.com/users/octocat/events{/privacy}',
181+
received_events_url: 'https://api.github.com/users/octocat/received_events',
182+
type: 'User',
183+
site_admin: false,
184+
name: 'monalisa octocat',
185+
company: '@GitHub',
186+
blog: 'github.com/blog',
187+
location: 'San Francisco',
188+
189+
hireable: false,
190+
bio: 'There once was...',
191+
public_repos: 2,
192+
public_gists: 1,
193+
followers: 20,
194+
following: 0,
195+
created_at: '2008-01-14T04:33:35Z',
196+
updated_at: '2008-01-14T04:33:35Z',
197+
};

0 commit comments

Comments
 (0)