summaryrefslogtreecommitdiff
path: root/spec/frontend/filtered_search/services/recent_searches_service_error_spec.js
blob: ea7c146fa4f012110af555682b9444154c57f70c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import RecentSearchesServiceError from '~/filtered_search/services/recent_searches_service_error';

describe('RecentSearchesServiceError', () => {
  let recentSearchesServiceError;

  beforeEach(() => {
    recentSearchesServiceError = new RecentSearchesServiceError();
  });

  it('instantiates an instance of RecentSearchesServiceError and not an Error', () => {
    expect(recentSearchesServiceError).toEqual(jasmine.any(RecentSearchesServiceError));
    expect(recentSearchesServiceError.name).toBe('RecentSearchesServiceError');
  });

  it('should set a default message', () => {
    expect(recentSearchesServiceError.message).toBe('Recent Searches Service is unavailable');
  });
});