app/mirage/config.js
// Mock all endpoints here as there is no real API during testing
Mock all endpoints here as there is no real API during testing
Mock all endpoints here as there is no real API during testing
function testConfig() {
    this.namespace = '/ghost/api/v0.1';    
    mockAuthentication(this);
    mockConfiguration(this);
    mockInvites(this);
    mockPosts(this);
    mockRoles(this);
    mockSettings(this);
    mockSlugs(this);
    mockSubscribers(this);
    mockTags(this);
    mockThemes(this);
    mockUsers(this);
    this.get('/notifications/', 'notifications');
    this.post('/slack/test', function () {
        return {};
    });
    let downloadCount = 0;
    this.get('https://count.ghost.org/', function () {
        downloadCount++;
        return {
            count: downloadCount
        };
    });
    this.get('http://www.gravatar.com/avatar/:md5', function () {
        return '';
    }, 200);
}
function testConfig ( ) { this . namespace = '/ghost/api/v0.1' ; mockAuthentication ( this ) ; mockConfiguration ( this ) ; mockInvites ( this ) ; mockPosts ( this ) ; mockRoles ( this ) ; mockSettings ( this ) ; mockSlugs ( this ) ; mockSubscribers ( this ) ; mockTags ( this ) ; mockThemes ( this ) ; mockUsers ( this ) ; this . get ( '/notifications/' , 'notifications' ) ; this . post ( '/slack/test' , function ( ) { return { } ; } ) ; let downloadCount = 0 ; this . get ( 'https://count.ghost.org/' , function ( ) { downloadCount ++ ; return { count : downloadCount } ; } ) ; this . get ( 'http://www.gravatar.com/avatar/:md5' , function ( ) { return '' ; } , 200 ) ; }
Mock all endpoints here as there is no real API during testing
Mock all endpoints here as there is no real API during testing
// this.urlPrefix = '';    // make this `http://localhost:8080`, for example, if your API is on a different server // make this `api`, for example, if your API is namespaced // this.timing = 400;      // delay for each request, automatically set to 0 during testing // this.logging = true; /* Notifications -------------------------------------------------------- */ /* Apps - Slack Test Notification --------------------------------------------------------- */ /* External sites ------------------------------------------------------- */