I think you guys made a mistake in thinking that "haveTotem" returns anything else than "true", because it doesn't. It in fact tests whether one has the TOTEM REAGENT, so if one is able to cast any totem of that school. It doesn't test for active totems.
I confirmed this ingame using this macro
Code:
/run local haveTotem, name = GetTotemInfo(1) if haveTotem then print("b") end
it always prints "b", regardless of whether I have an active totem or not. It does however not work on my druid.
I think there is no direct way to check for active totems, one has to use
because "name" returns nothing if there is no active totem.