
define(
[
    'chai',
    'sinon',
    'fixtures',
    'argumenta/widgets/AddTag',
    'argumenta/widgets/Base'
],
function(chai, undefined, fixtures, AddTag, Base) {

    var assert = chai.assert;

    // Tests

    describe('AddTag', function() {

        it('should be a function', function() {
            assert.isFunction(AddTag);
        });

        it('should include a moduleID', function() {
            assert.equal(AddTag.prototype.moduleID, 'AddTag');
        });

        describe('new AddTag( options, element )', function() {

            it('should return a new AddTag widget', function() {
                var target = fixtures.validPropositionData();
                var opts = {
                    tag_type:   'support',
                    target_type: target.target_type,
                    target_sha1: target.target_sha1
                };
                var addTag = new AddTag(opts);
                assert.instanceOf(
                    addTag, Base,
                    'AddTag widgets inherit from Base.'
                );
                assert.instanceOf(
                    addTag, AddTag,
                    'AddTag widgets are instances of AddTag.'
                );
            });
        });
    });
});

@@ -1227,24 +1227,2078 @@
 %0A        %7D);
+%0A%0A        describe('getTagType()', function() %7B%0A            it('should return the tag type', function() %7B%0A                var data = fixtures.validAddTagData();%0A                var addTag = new AddTag(data);%0A                assert.equal(%0A                    addTag.getTagType(),%0A                    data.tag_type,%0A                    'Check tag type.'%0A                );%0A            %7D);%0A        %7D);%0A%0A        describe('getTargetType()', function() %7B%0A            it('should return the target type', function() %7B%0A                var data = fixtures.validAddTagData();%0A                var addTag = new AddTag(data);%0A                assert.equal(%0A                    addTag.getTargetType(),%0A                    data.target_type,%0A                    'Check target type.'%0A                );%0A            %7D);%0A        %7D);%0A%0A        describe('getTargetSha1()', function() %7B%0A            it('should return the target SHA-1', function() %7B%0A                var data = fixtures.validAddTagData();%0A                var addTag = new AddTag(data);%0A                assert.equal(%0A                    addTag.getTargetSha1(),%0A                    data.target_sha1,%0A                    'Check target SHA-1.'%0A                );%0A            %7D);%0A        %7D);%0A%0A        describe('getSourceType()', function() %7B%0A            it('should return the source type', function() %7B%0A                var data = fixtures.validAddTagData();%0A                var addTag = new AddTag(data);%0A                assert.equal(%0A                    addTag.getSourceType(),%0A                    data.source_type,%0A                    'Check source type.'%0A                );%0A            %7D);%0A        %7D);%0A%0A        describe('getSourceSha1()', function() %7B%0A            it('should return the source SHA-1', function() %7B%0A                var data = fixtures.validAddTagData();%0A                var addTag = new AddTag(data);%0A                assert.equal(%0A                    addTag.getSourceSha1(),%0A                    data.source_sha1,%0A                    'Check source SHA-1.'%0A                );%0A            %7D);%0A        %7D);
 %0A    %7D);%0A%7D);

Add tests for AddTag accessors.