Skip to content

Commit

Permalink
Whoops, remove debug lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
m1kc committed Feb 7, 2016
1 parent b355e38 commit b40072e
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions tests/character.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -68,30 +68,20 @@ exports.createCharacter = (test) ->
insert 'locations', id: 2, initial: 1
insert 'uniusers', id: 1

console.log '1111'

try
console.log '+1111'
charid = character.createCharacter(conn, 1, 'My First Character', 'elf', 'female')
console.log '+2222'
char = query.row "SELECT * FROM characters"
console.log '+3333'
user = query.row "SELECT * FROM uniusers"
console.log '+4444'
catch ex
console.log ex.stack

console.log '2222'

test.strictEqual user.character_id, charid, "should switch user's character to new character"
test.strictEqual charid, char.id, 'should return new character id'
test.strictEqual char.name, 'My First Character', 'should create character with specified name'
test.strictEqual char.location, 2, 'should create character in initial location'
test.strictEqual char.race, 'elf', 'should create character with specified race'
test.strictEqual char.gender, 'female', 'should create character with specified gender'

console.log '3333'

ex = null
try
character.createCharacter(conn, 1, 'My First Character')
Expand All @@ -101,8 +91,6 @@ exports.createCharacter = (test) ->
test.strictEqual ex.message, 'character already exists',
'should throw CORRECT exception if such name has been taken'

console.log '4444'

energies = [
['orc', 'male', 220 ]
['orc', 'female', 200 ]
Expand All @@ -117,33 +105,25 @@ exports.createCharacter = (test) ->
test.strictEqual char.energy_max, x[2], "should set correct energy_max value for #{x[1]} #{x[0]}"
test.strictEqual char.energy, x[2], "should set correct energy value for #{x[1]} #{x[0]}"

console.log '5555'

test.throws(
-> character.createCharacter(conn, 1, 'My First Character', 'murloc', 'female')
Error
'should not allow weird races'
)

console.log '6666'

test.throws(
-> character.createCharacter(conn, 1, 'My First Character', 'orc', 'it')
Error
'should not allow weird genders'
)

console.log '7777'

query "UPDATE locations SET initial = 1"
test.throws(
-> character.createCharacter(conn, null, null)
Error
'should throw if something bad happened'
)

console.log '8888'

test.done()


Expand Down

0 comments on commit b40072e

Please sign in to comment.