Skip to content

Commit

Permalink
feature(fix): acquire develop changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Musigwa committed May 9, 2019
1 parent 62b1ca4 commit 2eacd27
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
24 changes: 6 additions & 18 deletions src/__tests__/__actions__/notificationAction.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ describe("test the notification actions", () => {
{ type: NOTIFICATION_FAILED, payload: errorMessage }
];
moxios.stubRequest(
`${process.env.API_URL}/users/notifications/${
notifications[0].id
}`,
`${process.env.API_URL}/users/notifications/${notifications[0].id}`,
{
status: 500,
response: { message: errorMessage }
Expand All @@ -106,9 +104,7 @@ describe("test the notification actions", () => {
{ type: NOTIFICATION_FAILED, payload: errorMessage }
];
moxios.stubRequest(
`${process.env.API_URL}/users/notifications/${
notifications[1].id
}`,
`${process.env.API_URL}/users/notifications/${notifications[1].id}`,
{
status: 201,
response: { message: errorMessage }
Expand All @@ -130,9 +126,7 @@ describe("test the notification actions", () => {
{ type: DELETE_NOTIFICATION, payload: notifications[0].id }
];
moxios.stubRequest(
`${process.env.API_URL}/users/notifications/${
notifications[0].id
}`,
`${process.env.API_URL}/users/notifications/${notifications[0].id}`,
{
status: 200,
response: { user: { newNotifications } }
Expand All @@ -155,9 +149,7 @@ describe("test the notification actions", () => {
{ type: NOTIFICATION_FAILED, payload: errorMessage }
];
moxios.stubRequest(
`${process.env.API_URL}/users/notifications/${
notifications[1].id
}d`,
`${process.env.API_URL}/users/notifications/${notifications[1].id}d`,
{
status: 400,
response: { message: errorMessage }
Expand All @@ -178,9 +170,7 @@ describe("test the notification actions", () => {
{ type: NOTIFICATION_FAILED, payload: errorMessage }
];
moxios.stubRequest(
`${process.env.API_URL}/users/notifications/${
notifications[1].id
}`,
`${process.env.API_URL}/users/notifications/${notifications[1].id}`,
{
status: 200,
response: { message: errorMessage }
Expand All @@ -199,9 +189,7 @@ describe("test the notification actions", () => {
{ type: DELETE_NOTIFICATION, payload: notifications[0].id }
];
moxios.stubRequest(
`${process.env.API_URL}/users/notifications/${
notifications[0].id
}`,
`${process.env.API_URL}/users/notifications/${notifications[0].id}`,
{
status: 201,
response: {
Expand Down
1 change: 0 additions & 1 deletion src/components/common/AppBars/navBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export class Navbar extends Component {

componentDidMount() {
document.addEventListener("mousedown", this.handleClickOutside);

const { getNotifications } = this.props;
getNotifications();
}
Expand Down

0 comments on commit 2eacd27

Please sign in to comment.