not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
978 B

  1. define(["sugar-web/env"], function (env) {
  2. 'use strict';
  3. describe("Environment object", function () {
  4. it("should have valid properties", function () {
  5. //FIXME: we shouldn't stub this here.
  6. //current implementation of isStandalone fails with sugar-web-test
  7. spyOn(env, 'isStandalone').andReturn(false);
  8. var expectedEnv;
  9. runs(function () {
  10. env.getEnvironment(function (error, environment) {
  11. expectedEnv = environment;
  12. });
  13. });
  14. waitsFor(function () {
  15. return expectedEnv !== undefined;
  16. }, "should get sugar environment");
  17. runs(function () {
  18. expect(expectedEnv.bundleId).not.toBeUndefined();
  19. expect(expectedEnv.activityId).not.toBeUndefined();
  20. expect(expectedEnv.activityName).not.toBeUndefined();
  21. });
  22. });
  23. });
  24. });