Fix order of assert_equal calls that were backwards

The expected value is the first argument, and the actual value the second. This fixes all instances of `assert_equal` that were backwards.