30:efdf4524dafd
Anton Shestakov <engored@ya.ru>, Sun, 02 Mar 2014 22:10:59 +0900
Backout nicknames: would make more sense to have nicknames in lobby, not in a room.

next change 34:19dac34d9a51
previous change 24:19a7ba960f8e

test/rps3_tests.erl

Permissions: -rw-r--r--

Other formats: Feeds:
-module(rps3_tests).
-include_lib("eunit/include/eunit.hrl").
get_rules_test() ->
?assertEqual(length(rps3:get_rules()), 3).
winning_hand_test() ->
?assertEqual(rps3:winning_hand([rock, paper]), paper),
?assertEqual(rps3:winning_hand([paper, scissors]), scissors),
?assertEqual(rps3:winning_hand([scissors, rock]), rock),
?assertEqual(rps3:winning_hand([rock, rock, rock]), rock),
?assertEqual(rps3:winning_hand([rock, paper, scissors]), undefined),
?assertEqual(rps3:winning_hand([rock, paper, paper]), paper),
?assertEqual(rps3:winning_hand([rock, rock, paper]), paper).