~ubuntu-branches/ubuntu/trusty/freeipa/trusty

« back to all changes in this revision

Viewing changes to install/ui/test/association_tests.js

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2013-03-07 14:10:03 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130307141003-kz4lq9vj4x692mqq
Tags: 3.1.2-0ubuntu1
* Merge from unreleased debian git.
  - new upstream release
  - doesn't use chkconfig anymore (LP: #1025018, #1124093)
  - drop -U from the ntpdate options (LP: #1149468)

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
    var orig_ipa_batch_command = IPA.batch_command;
29
29
 
 
30
    var user = IPA.entity({ name: 'user' });
 
31
    var group = IPA.entity({ name: 'group' });
 
32
 
30
33
    var params = {
31
34
        method: 'add_member',
32
35
        pkey: 'test',
33
 
        entity: {name:'user'},
34
 
        other_entity: 'group'
 
36
        entity: user,
 
37
        other_entity: group
35
38
    };
36
39
 
37
40
    params.values = ['user1', 'user2', 'user3'];
50
53
                command = that.commands[i];
51
54
 
52
55
                equals(
53
 
                    command.entity, params.other_entity,
54
 
                    'Checking IPA.command() parameter: entity'
55
 
                );
 
56
                    command.entity, params.other_entity.name,
 
57
                    'Checking IPA.command() parameter: entity');
56
58
 
57
59
                equals(
58
60
                    command.method, params.method,
59
 
                    'Checking IPA.command() parameter: method'
60
 
                );
 
61
                    'Checking IPA.command() parameter: method');
61
62
 
62
63
                equals(
63
64
                    command.args[0], 'user'+(i+1),
64
 
                    'Checking IPA.command() parameter: primary key'
65
 
                );
 
65
                    'Checking IPA.command() parameter: primary key');
66
66
            }
67
67
 
68
68
            that.on_success({});
89
89
 
90
90
    var counter = 0;
91
91
 
 
92
    var user = IPA.entity({ name: 'user' });
 
93
    var group = IPA.entity({ name: 'group' });
 
94
 
92
95
    var params = {
93
 
        method: "add_member",
94
 
        pkey: "test",
95
 
        entity: {name:"user"},
96
 
        other_entity: "group"
 
96
        method: 'add_member',
 
97
        pkey: 'test',
 
98
        entity: user,
 
99
        other_entity: group
97
100
    };
98
101
 
99
102
    params.values = ['user1', 'user2', 'user3'];
107
110
 
108
111
            equals(
109
112
                that.method, params.method,
110
 
                'Checking IPA.command() parameter: method'
111
 
            );
 
113
                'Checking IPA.command() parameter: method');
112
114
 
113
115
            equals(
114
116
                that.args[0], params.pkey,
115
 
                'Checking IPA.command() parameter: primary key'
116
 
            );
 
117
                'Checking IPA.command() parameter: primary key');
117
118
 
118
119
            equals(
119
 
                that.options[params.other_entity], 'user1,user2,user3',
120
 
                'Checking IPA.command() parameter: options[\""+params.other_entity+"\"]'
121
 
            );
 
120
                that.options[params.other_entity.name], 'user1,user2,user3',
 
121
                'Checking IPA.command() parameter: options[\""+params.other_entity+"\"]');
122
122
 
123
123
            that.on_success({});
124
124
        };