Sha256: 4d1625535a13b8d0c477979eb5c86a7b288d325d3f65d1c923b43aebafa05656

Contents?: true

Size: 1.02 KB

Versions: 16

Compression:

Stored size: 1.02 KB

Contents

describe("Grant", function() {
  var person = require('sufia/permissions/person');
  var pkg = require('sufia/permissions/grant');
  var target

  beforeEach(function() {
    var agent = new person.Person('Hannah');
    target = new pkg.Grant(agent, 'read', 'View/Download');
  });

  describe("name", function() {
    it("is delegates name to agent", function() {
      expect(target.name).toEqual('Hannah');
    });
  });

  describe("type", function() {
    it("is delegates type to agent", function() {
      expect(target.type).toEqual('person');
    });
  });

  describe("access", function() {
    it("is has access", function() {
      expect(target.access).toEqual('read');
    });
  });

  describe("accessLabel", function() {
    it("is has accessLabel", function() {
      expect(target.accessLabel).toEqual('View/Download');
    });
  });

  describe("index", function() {
    it("is has index", function() {
      expect(target.index).toEqual(0);
      target.index = 2
      expect(target.index).toEqual(2);
    });
  });
});

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
sufia-7.4.1 spec/javascripts/grant_spec.js
sufia-7.4.0 spec/javascripts/grant_spec.js
sufia-7.3.1 spec/javascripts/grant_spec.js
sufia-7.3.0 spec/javascripts/grant_spec.js
sufia-7.3.0.rc3 spec/javascripts/grant_spec.js
sufia-7.3.0.rc2 spec/javascripts/grant_spec.js
sufia-7.3.0.rc1 spec/javascripts/grant_spec.js
sufia-7.2.0 spec/javascripts/grant_spec.js
sufia-7.1.0 spec/javascripts/grant_spec.js
sufia-7.0.0 spec/javascripts/grant_spec.js
sufia-7.0.0.rc2 spec/javascripts/grant_spec.js
sufia-7.0.0.rc1 spec/javascripts/grant_spec.js
sufia-7.0.0.beta4 spec/javascripts/grant_spec.js
sufia-7.0.0.beta3 spec/javascripts/grant_spec.js
sufia-7.0.0.beta2 spec/javascripts/grant_spec.js
sufia-7.0.0.beta1 spec/javascripts/grant_spec.js