Commit 7816c046 authored by Juan Manuel Solaro's avatar Juan Manuel Solaro
Browse files

(fix) change spec message for selector.component

parent fe3fcb81
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -73,14 +73,14 @@ describe('PosterDateSelectorComponent', () => {
    );
    );
  }));
  }));


  it('should emit onError when date less than 5 minutes', fakeAsync(() => {
  it('should emit onError when date less than 5 minutes or in the past', fakeAsync(() => {
    spyOn(comp.onError, 'emit');
    spyOn(comp.onError, 'emit');
    const testDate = new Date();
    const testDate = new Date();
    comp.onDateChange(testDate.toString());
    comp.onDateChange(testDate.toString());
    let timeDate = testDate.getTime();
    let timeDate = testDate.getTime();
    timeDate = Math.floor(timeDate / 1000);
    timeDate = Math.floor(timeDate / 1000);
    expect(comp.onError.emit).toHaveBeenCalledWith(
    expect(comp.onError.emit).toHaveBeenCalledWith(
      "Scheduled date can't be less than 5 minutes"
      "Scheduled date can't be less than 5 minutes or in the past"
    );
    );
  }));
  }));
});
});