text: /******************************************************************************
   * Test steps
   *  1. Block a user
   *  2. Check if a user is blocked
   *  3. List all blocked users
   *  4. Remove blocked users and check to see if they're unblocked
   */
  const expect = require('chai').expect;
  const blockedService = require('../../components/relationships/blocked-services')
  const utilities = require('../utilities')
  
  // Aliasing functions to account if they're being tested or not
  const addBlocked = blockedService.addBlocked
  const isBlocked = blockedService.isBlocked
  const getBlockedUsers = blockedService.getBlockedUsers
  const deleteBlocked = blockedService.deleteBlocked
  
  // Globals
  const ACCOUNT_ID = utilities.createRandomId()
  const BLOCKED_USERS_NUM = Math.ceil(Math.random()*15) + 5
  let random_users = []
  
  module.exports = () => {
  	for(let i = 0; i < BLOCKED_USERS_NUM; i++) {random_users.push(
  		{
  			accountOwner: utilities.createRandomId(ACCOUNT_ID),
  			characterName: `${utilities.pad(Math.ceil(Math.random()*999999), 6)}`
  		}
  	)}
  
  	return describe(`Testing blocking relationships`, () =>{
  		it ('Adding a blocked user', test_addBlocked)
  		it ('Checking if a user is blocked', test_isBlocked)
  		it (`Testing getting blocked users list`, test_getBlockedUsers)
  		it (`Testing deleting blocked uesrs`, test_deleteBlocked)
  	})
  }
  
  async function test_addBlocked() {
  	let blockedData = null
  	random_users.forEach(async (user) => {
  		blockedData = await addBlocked(ACCOUNT_ID, user)
  		expect(blockedData !== null).to.equal(true)
  	})
  }
  
  async function test_isBlocked() {
  	random_users.forEach(async (user) => {
  		let blockedData = await isBlocked(ACCOUNT_ID, user.accountOwner)
  		expect(blockedData !== null).to.equal(true)
  	})
  }
  
  async function test_getBlockedUsers() {
  	let blockedData = await getBlockedUsers(ACCOUNT_ID)
  	expect(blockedData.length).to.equal(BLOCKED_USERS_NUM)
  
  	const NUM_DATA_ENTRIES = blockedData.length
  
  	for(let idx = 0; idx < NUM_DATA_ENTRIES; idx++) {
  		expect(blockedData[idx].blockedName).to.equal(random_users[idx].characterName)
  	}
  }
  
  async function test_deleteBlocked() {
  	random_users.forEach(async (user) => {
  		let blockedData = await deleteBlocked(ACCOUNT_ID, user.accountOwner)
  		expect(blockedData.ok).to.equal(1)
  
  		blockedData = await isBlocked(ACCOUNT_ID, user.accountOwner)
  		expect(blockedData === null).to.equal(true)
  	})
  }
  
  