Skip to content

Commit

Permalink
Rename logsRetentionUpdating
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonStoltz committed Nov 4, 2020
1 parent 267d233 commit 9a19871
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe('LogRetentionLogic', () => {
const DEFAULT_VALUES = {
logRetention: null,
openedModal: null,
logsRetentionUpdating: false,
isLogRetentionUpdating: false,
};

const mount = (defaults?: object) => {
Expand Down Expand Up @@ -113,34 +113,34 @@ describe('LogRetentionLogic', () => {
});
});

describe('logsRetentionUpdating', () => {
it('resets logsRetentionUpdating to false', () => {
describe('isLogRetentionUpdating', () => {
it('resets isLogRetentionUpdating to false', () => {
mount({
logsRetentionUpdating: true,
isLogRetentionUpdating: true,
});

LogRetentionLogic.actions.closeModals();

expect(LogRetentionLogic.values).toEqual({
...DEFAULT_VALUES,
logsRetentionUpdating: false,
isLogRetentionUpdating: false,
});
});
});
});

describe('clearLogRetentionUpdating', () => {
describe('logsRetentionUpdating', () => {
it('resets logsRetentionUpdating to false', () => {
describe('isLogRetentionUpdating', () => {
it('resets isLogRetentionUpdating to false', () => {
mount({
logsRetentionUpdating: true,
isLogRetentionUpdating: true,
});

LogRetentionLogic.actions.clearLogRetentionUpdating();

expect(LogRetentionLogic.values).toEqual({
...DEFAULT_VALUES,
logsRetentionUpdating: false,
isLogRetentionUpdating: false,
});
});
});
Expand Down Expand Up @@ -250,17 +250,17 @@ describe('LogRetentionLogic', () => {
});

describe('toggleLogRetention', () => {
describe('logsRetentionUpdating', () => {
it('sets logsRetentionUpdating to true', () => {
describe('isLogRetentionUpdating', () => {
it('sets isLogRetentionUpdating to true', () => {
mount({
logsRetentionUpdating: false,
isLogRetentionUpdating: false,
});

LogRetentionLogic.actions.toggleLogRetention(ELogRetentionOptions.Analytics);

expect(LogRetentionLogic.values).toEqual({
...DEFAULT_VALUES,
logsRetentionUpdating: true,
isLogRetentionUpdating: true,
});
});
});
Expand Down Expand Up @@ -316,17 +316,17 @@ describe('LogRetentionLogic', () => {
});

describe('fetchLogRetention', () => {
describe('logsRetentionUpdating', () => {
it('sets logsRetentionUpdating to true', () => {
describe('isLogRetentionUpdating', () => {
it('sets isLogRetentionUpdating to true', () => {
mount({
logsRetentionUpdating: false,
isLogRetentionUpdating: false,
});

LogRetentionLogic.actions.fetchLogRetention();

expect(LogRetentionLogic.values).toEqual({
...DEFAULT_VALUES,
logsRetentionUpdating: true,
isLogRetentionUpdating: true,
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface ILogRetentionActions {

interface ILogRetentionValues {
logRetention: ILogRetention | null;
logsRetentionUpdating: boolean;
isLogRetentionUpdating: boolean;
openedModal: ELogRetentionOptions | null;
}

Expand Down Expand Up @@ -59,7 +59,7 @@ export const LogRetentionLogic = kea<MakeLogicType<ILogRetentionValues, ILogRete
},
},
],
logsRetentionUpdating: [
isLogRetentionUpdating: [
false,
{
clearLogRetentionUpdating: () => false,
Expand Down

0 comments on commit 9a19871

Please sign in to comment.