-
Notifications
You must be signed in to change notification settings - Fork 783
test: added tests for notifications reducer #567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
27dbfa5
343af18
a701604
f6f8445
6653325
e608c3b
16e6e8b
c100519
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export const authError = { | ||
message: 'Requires authentication', | ||
documentation_url: | ||
'https://developer.github.com/v3/activity/notifications/#list-your-notifications', | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
export const notification = { | ||
id: '1', | ||
repository: { | ||
id: 1296269, | ||
owner: { | ||
login: 'octocat', | ||
id: 1, | ||
avatar_url: 'https://github.com/images/error/octocat_happy.gif', | ||
gravatar_id: '', | ||
url: 'https://api.github.com/users/octocat', | ||
html_url: 'https://github.com/octocat', | ||
followers_url: 'https://api.github.com/users/octocat/followers', | ||
following_url: | ||
'https://api.github.com/users/octocat/following{/other_user}', | ||
gists_url: 'https://api.github.com/users/octocat/gists{/gist_id}', | ||
starred_url: | ||
'https://api.github.com/users/octocat/starred{/owner}{/repo}', | ||
subscriptions_url: 'https://api.github.com/users/octocat/subscriptions', | ||
organizations_url: 'https://api.github.com/users/octocat/orgs', | ||
repos_url: 'https://api.github.com/users/octocat/repos', | ||
events_url: 'https://api.github.com/users/octocat/events{/privacy}', | ||
received_events_url: | ||
'https://api.github.com/users/octocat/received_events', | ||
type: 'User', | ||
site_admin: false, | ||
}, | ||
name: 'Hello-World', | ||
full_name: 'octocat/Hello-World', | ||
description: 'This your first repo!', | ||
private: false, | ||
fork: false, | ||
url: 'https://api.github.com/repos/octocat/Hello-World', | ||
html_url: 'https://github.com/octocat/Hello-World', | ||
}, | ||
subject: { | ||
title: 'Greetings', | ||
url: 'https://api.github.com/repos/octokit/octokit.rb/issues/123', | ||
latest_comment_url: | ||
'https://api.github.com/repos/octokit/octokit.rb/issues/comments/123', | ||
type: 'Issue', | ||
}, | ||
reason: 'subscribed', | ||
unread: true, | ||
updated_at: '2014-11-07T22:01:45Z', | ||
last_read_at: '2014-11-07T22:01:45Z', | ||
url: 'https://api.github.com/notifications/threads/1', | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export default { | ||
name: 'test tag', | ||
name: 'test label text', | ||
color: 'c3c3c3', | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import { closed as closedIssue, open as openIssue } from '../../data/issue'; | ||
import { closed as closedIssue, open as openIssue } from '../../data/api/issue'; | ||
import { | ||
closed as closedPr, | ||
open as openPr, | ||
merged as mergedPr, | ||
} from '../../data/pull-request'; | ||
} from '../../data/api/pull-request'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also we're using relative imports here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are just tests I touched when I moved the test data files, my discipline tells me update all tests in a different PR but I'll do it here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @alejandronanez all references updated to use alias instead of absolute paths. |
||
import { colors } from 'config'; | ||
|
||
import { StateBadge } from 'components'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we can use absolute imports instead of relative imports? Relative imports can get messy pretty quick.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This occurred to me, I'll update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm we're still using relative imports here.