• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atlp-rwanda / vikings-ec-fe / 6a81dcf9-2e6d-40d4-b78b-4b7d0bc9415e

pending completion
6a81dcf9-2e6d-40d4-b78b-4b7d0bc9415e

push

circleci

GitHub
feat: implement Display Users (#22)

245 of 445 branches covered (55.06%)

Branch coverage included in aggregate %.

163 of 163 new or added lines in 9 files covered. (100.0%)

1043 of 1308 relevant lines covered (79.74%)

9.94 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.31
/src/features/auth/changeUserStatusSlice.js
1
import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
2
import axios from '../api/customAxios';
3

4
export const changeStatus = createAsyncThunk(
39✔
5
  'changeStatus',
6
  async ({ payload, id }, { rejectWithValue }) => {
7
    try {
1✔
8
      const { data } = await axios.put(`/users/${id}`, {
1✔
9
        ...payload,
10
      });
11
      return data;
1✔
12
    } catch (error) {
13
      return rejectWithValue(error.response);
×
14
    }
15
  },
16
);
17

18
const changeUserStatusSlice = createSlice({
39✔
19
  name: 'changeStatus',
20
  initialState: {
21
    data: null,
22
    isLoading: false,
23
  },
24
  extraReducers: (builer) => {
25
    builer
39✔
26
      .addCase(changeStatus.pending, (state) => {
27
        state.isLoading = true;
1✔
28
      })
29
      .addCase(changeStatus.fulfilled, (state, { payload }) => {
30
        state.isLoading = false;
1✔
31
        state.data = payload;
1✔
32
      })
33
      .addCase(changeStatus.rejected, (state, { payload }) => {
34
        state.isLoading = false;
1✔
35
        state.error = payload;
1✔
36
      });
37
  },
38
});
39
export const changeStatusActions = (state) => state.changeStatus.data;
39✔
40
export default changeUserStatusSlice.reducer;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc