Skip to content

Instantly share code, notes, and snippets.

View Fiyiin's full-sized avatar

Fiyin Kolawole Fiyiin

  • @Plholder
  • Lagos, Nigeria
View GitHub Profile
@Fiyiin
Fiyiin / main.dart
Last active December 9, 2020 15:45
Tabbed Profile Layout
import 'package:flutter/material.dart';
import 'dart:math' as math;
int currentIndex = 0;
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
@Fiyiin
Fiyiin / get single reported
Created April 18, 2019 08:58
this is quite painful
/**
* 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) {
@Fiyiin
Fiyiin / test.js
Last active March 21, 2019 08:19
A gist to demo tests to unfollow a user on Author's Haven
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')
@Fiyiin
Fiyiin / test.js
Created March 19, 2019 18:51
A gist to demo tests for the medium.com codebase
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(
{