Unit test for rating directive