This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'dart:math' as math; | |
int currentIndex = 0; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatefulWidget { | |
@override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* middleware to get all reported comments | |
* @static | |
* @param {Request} req request object | |
* @param {Response} res response object | |
* @param {Function} next called on server errors | |
* @returns {void} void | |
* @memberof ReportedComments | |
*/ | |
static async getReported(req, res, next) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import request from 'supertest'; | |
import expect from 'expect'; | |
import app from '../app'; | |
describe('To Unfollow a User ', () => { | |
it('should return the user profile object', (done) => { | |
request(app) | |
.delete('/api/profiles/jake/follow') | |
.set('Authorization', 'JWT') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('To Unfollow a User ', () => { | |
it('should return the user profile object', (done) => { | |
request(app) | |
.delete('/api/profiles/:username/follow') | |
.set('Authorization', 'JWT') | |
.expect('Content-Type', /json/) | |
.expect(200) | |
.expect((res) => { | |
expect(res.body).toEqual( | |
{ |