the-city-admin 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +9 -0
- data/.gitignore +4 -0
- data/.rspec +2 -0
- data/.rvmrc +1 -0
- data/.yardoc/checksums +50 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +51 -0
- data/README +1 -0
- data/Rakefile +32 -0
- data/index.rb +123 -0
- data/lib/common.rb +163 -72
- data/lib/the_city_admin.rb +2 -2
- data/notes.txt +21 -0
- data/spec/api/address_list_spec.rb +0 -0
- data/spec/api/address_spec.rb +0 -0
- data/spec/api/group_address_list_spec.rb +93 -0
- data/spec/api/group_address_spec.rb +19 -0
- data/spec/api/group_checkin_list_spec.rb +93 -0
- data/spec/api/group_event_attendance_list_spec.rb +93 -0
- data/spec/api/group_export_spec.rb +19 -0
- data/spec/api/group_invitation_list_spec.rb +23 -0
- data/spec/api/group_invitation_spec.rb +19 -0
- data/spec/api/group_list_spec.rb +23 -0
- data/spec/api/group_role_list_spec.rb +23 -0
- data/spec/api/group_role_spec.rb +19 -0
- data/spec/api/group_spec.rb +19 -0
- data/spec/api/group_tag_list_spec.rb +23 -0
- data/spec/api/group_tag_spec.rb +19 -0
- data/spec/api/metric_list_spec.rb +22 -0
- data/spec/api/metric_measurement_list_spec.rb +23 -0
- data/spec/api/metric_measurement_spec.rb +19 -0
- data/spec/api/metric_spec.rb +19 -0
- data/spec/api/role_list_spec.rb +75 -0
- data/spec/api/role_spec.rb +19 -0
- data/spec/api/skill_list_spec.rb +76 -0
- data/spec/api/skilled_user_id_list_spec.rb +82 -0
- data/spec/api/skilled_user_list_spec.rb +82 -0
- data/spec/api/tag_group_list_spec.rb +72 -0
- data/spec/api/tag_list_spec.rb +77 -0
- data/spec/api/tag_spec.rb +19 -0
- data/spec/api/terminology_list_spec.rb +75 -0
- data/spec/api/terminology_spec.rb +19 -0
- data/spec/api/user_address_list_spec.rb +92 -0
- data/spec/api/user_address_spec.rb +19 -0
- data/spec/api/user_admin_privilege_list_spec.rb +94 -0
- data/spec/api/user_admin_privilege_spec.rb +19 -0
- data/spec/api/user_barcode_spec.rb +19 -0
- data/spec/api/user_family_list_spec.rb +91 -0
- data/spec/api/user_family_member_spec.rb +19 -0
- data/spec/api/user_invitation_list_spec.rb +91 -0
- data/spec/api/user_invitation_spec.rb +19 -0
- data/spec/api/user_list_spec.rb +76 -0
- data/spec/api/user_note_list_spec.rb +91 -0
- data/spec/api/user_note_spec.rb +19 -0
- data/spec/api/user_process_list_spec.rb +90 -0
- data/spec/api/user_process_spec.rb +19 -0
- data/spec/api/user_role_list_spec.rb +92 -0
- data/spec/api/user_role_spec.rb +18 -0
- data/spec/api/user_skill_list_spec.rb +91 -0
- data/spec/api/user_skill_spec.rb +19 -0
- data/spec/api/user_spec.rb +37 -0
- data/spec/api/web_hook_list_spec.rb +75 -0
- data/spec/api/web_hook_spec.rb +19 -0
- data/spec/factories/address.rb +21 -0
- data/spec/factories/address_list.rb +13 -0
- data/spec/factories/checkin.rb +35 -0
- data/spec/factories/checkin_list.rb +13 -0
- data/spec/factories/group.rb +30 -0
- data/spec/factories/group_address.rb +21 -0
- data/spec/factories/group_address_list.rb +13 -0
- data/spec/factories/group_checkin.rb +35 -0
- data/spec/factories/group_checkin_list.rb +13 -0
- data/spec/factories/group_event_attendance.rb +19 -0
- data/spec/factories/group_event_attendance_list.rb +13 -0
- data/spec/factories/group_export.rb +16 -0
- data/spec/factories/group_export_list.rb +13 -0
- data/spec/factories/group_role.rb +19 -0
- data/spec/factories/group_tag.rb +12 -0
- data/spec/factories/role.rb +22 -0
- data/spec/factories/role_list.rb +13 -0
- data/spec/factories/skill.rb +13 -0
- data/spec/factories/skill_list.rb +13 -0
- data/spec/factories/skilled_user_id_list.rb +13 -0
- data/spec/factories/skilled_user_list.rb +13 -0
- data/spec/factories/tag.rb +13 -0
- data/spec/factories/tag_group_list.rb +13 -0
- data/spec/factories/tag_list.rb +13 -0
- data/spec/factories/terminology.rb +10 -0
- data/spec/factories/terminology_list.rb +13 -0
- data/spec/factories/user.rb +51 -0
- data/spec/factories/user_address.rb +19 -0
- data/spec/factories/user_address_list.rb +13 -0
- data/spec/factories/user_admin_privilege.rb +11 -0
- data/spec/factories/user_admin_privilege_list.rb +13 -0
- data/spec/factories/user_barcode.rb +15 -0
- data/spec/factories/user_family_list.rb +13 -0
- data/spec/factories/user_family_member.rb +28 -0
- data/spec/factories/user_invitation.rb +16 -0
- data/spec/factories/user_invitation_list.rb +13 -0
- data/spec/factories/user_list.rb +13 -0
- data/spec/factories/user_note.rb +28 -0
- data/spec/factories/user_note_list.rb +13 -0
- data/spec/factories/user_process.rb +11 -0
- data/spec/factories/user_process_list.rb +13 -0
- data/spec/factories/user_role.rb +17 -0
- data/spec/factories/user_role_list.rb +13 -0
- data/spec/factories/user_skill.rb +10 -0
- data/spec/factories/user_skill_list.rb +13 -0
- data/spec/factories/web_hook.rb +12 -0
- data/spec/factories/web_hook_list.rb +13 -0
- data/spec/functional/the_city_admin_spec.rb +20 -0
- data/spec/readers/user_reader_spec.rb +7 -0
- data/spec/spec_helper.rb +31 -0
- data/spec/writers/skill_writer_spec.rb +0 -0
- data/spec/writers/tag_writer_spec.rb +80 -0
- data/spec/writers/user_writer_spec.rb +80 -0
- data/status.txt +187 -0
- data/test_scripts/addresses.rb +36 -0
- data/test_scripts/barcodes_checkins.rb +45 -0
- data/test_scripts/city_keys.rb +6 -0
- data/test_scripts/familes.rb +83 -0
- data/test_scripts/groups.rb +124 -0
- data/test_scripts/metrics.rb +72 -0
- data/test_scripts/roles.rb +94 -0
- data/test_scripts/skills.rb +55 -0
- data/test_scripts/tags.rb +71 -0
- data/test_scripts/terminology.rb +62 -0
- data/test_scripts/users.rb +325 -0
- data/test_scripts/webhooks.rb +57 -0
- data/thecity_admin_api.gemspec +39 -0
- data/thecity_headers.rb +27 -0
- metadata +238 -3
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.join(Dir.pwd, 'spec', 'spec_helper')
|
2
|
+
|
3
|
+
describe 'GroupTagList' do
|
4
|
+
|
5
|
+
before do
|
6
|
+
simulate_connection_to_server
|
7
|
+
end
|
8
|
+
|
9
|
+
after do
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
it 'should pass if group tag list attribute is not specifed'
|
15
|
+
it 'should pass if group tag list is empty'
|
16
|
+
it 'should return a valid list of group tags'
|
17
|
+
it 'should iterate using *each* method'
|
18
|
+
it 'should iterate using *collect* method'
|
19
|
+
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require File.join(Dir.pwd, 'spec', 'spec_helper')
|
2
|
+
|
3
|
+
describe 'MetricList' do
|
4
|
+
|
5
|
+
before do
|
6
|
+
simulate_connection_to_server
|
7
|
+
end
|
8
|
+
|
9
|
+
after do
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
it 'should pass if matric list attribute is not specifed'
|
15
|
+
it 'should pass if matric list is empty'
|
16
|
+
it 'should return a valid list of matrics'
|
17
|
+
it 'should iterate using *each* method'
|
18
|
+
it 'should iterate using *collect* method'
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.join(Dir.pwd, 'spec', 'spec_helper')
|
2
|
+
|
3
|
+
describe 'MetricMeasurementList' do
|
4
|
+
|
5
|
+
before do
|
6
|
+
simulate_connection_to_server
|
7
|
+
end
|
8
|
+
|
9
|
+
after do
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
it 'should pass if metric measurement list attribute is not specifed'
|
15
|
+
it 'should pass if metric measurement list is empty'
|
16
|
+
it 'should return a valid list of metric measurements'
|
17
|
+
it 'should iterate using *each* method'
|
18
|
+
it 'should iterate using *collect* method'
|
19
|
+
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require File.join(Dir.pwd, 'spec', 'spec_helper')
|
2
|
+
|
3
|
+
describe 'RoleList' do
|
4
|
+
|
5
|
+
before do
|
6
|
+
simulate_connection_to_server
|
7
|
+
end
|
8
|
+
|
9
|
+
after do
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
it 'should pass if role list attribute is not specifed' do
|
15
|
+
request_data = FactoryGirl.attributes_for(:role_list).to_json
|
16
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
17
|
+
role_list = TheCity::RoleList.new
|
18
|
+
|
19
|
+
role_list.roles.should == []
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
it 'should pass if role list is empty' do
|
24
|
+
request_data = FactoryGirl.attributes_for(:role_list, :roles => []).to_json
|
25
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
26
|
+
role_list = TheCity::RoleList.new
|
27
|
+
|
28
|
+
role_list.roles.should == []
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
it 'should return a valid list of roles' do
|
33
|
+
request_data = FactoryGirl.attributes_for(:role_list, {
|
34
|
+
:total_entries => 1,
|
35
|
+
:total_pages => 1,
|
36
|
+
:roles => [FactoryGirl.attributes_for(:role)]
|
37
|
+
}).to_json
|
38
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
39
|
+
role_list = TheCity::RoleList.new({:page => 2})
|
40
|
+
role_list.roles.should == ["Leader"]
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
it 'should iterate using *each* method' do
|
45
|
+
request_data = FactoryGirl.attributes_for(:role_list, {
|
46
|
+
:total_entries => 1,
|
47
|
+
:total_pages => 1,
|
48
|
+
:roles => [FactoryGirl.attributes_for(:role)]
|
49
|
+
}).to_json
|
50
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
51
|
+
role_list = TheCity::RoleList.new
|
52
|
+
|
53
|
+
roles = []
|
54
|
+
role_list.each { |role| roles << role.title }
|
55
|
+
role_list.roles.should == ["Leader"]
|
56
|
+
end
|
57
|
+
|
58
|
+
|
59
|
+
it 'should iterate using *collect* method' do
|
60
|
+
request_data = FactoryGirl.attributes_for(:role_list, {
|
61
|
+
:total_entries => 1,
|
62
|
+
:total_pages => 1,
|
63
|
+
:roles => [FactoryGirl.attributes_for(:role)]
|
64
|
+
}).to_json
|
65
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
66
|
+
role_list = TheCity::RoleList.new
|
67
|
+
|
68
|
+
roles = role_list.collect { |role| role.title }
|
69
|
+
role_list.roles.should == ["Leader"]
|
70
|
+
end
|
71
|
+
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require File.join(Dir.pwd, 'spec', 'spec_helper')
|
2
|
+
|
3
|
+
describe 'SkillList' do
|
4
|
+
|
5
|
+
before do
|
6
|
+
simulate_connection_to_server
|
7
|
+
end
|
8
|
+
|
9
|
+
after do
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
it 'should pass if skill list attribute is not specifed' do
|
15
|
+
request_data = FactoryGirl.attributes_for(:skill_list).to_json
|
16
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
17
|
+
skill_list = TheCity::SkillList.new
|
18
|
+
|
19
|
+
skill_list.skills.should == []
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
it 'should pass if skill list is empty' do
|
24
|
+
request_data = FactoryGirl.attributes_for(:skill_list, :skills => []).to_json
|
25
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
26
|
+
skill_list = TheCity::SkillList.new
|
27
|
+
|
28
|
+
skill_list.skills.should == []
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
it 'should return a valid list of skills' do
|
33
|
+
request_data = FactoryGirl.attributes_for(:skill_list, {
|
34
|
+
:total_entries => 1,
|
35
|
+
:total_pages => 1,
|
36
|
+
:skills => [FactoryGirl.attributes_for(:skill)]
|
37
|
+
}).to_json
|
38
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
39
|
+
skill_list = TheCity::SkillList.new({:page => 2})
|
40
|
+
|
41
|
+
skill_list.skills.should == ["Welding"]
|
42
|
+
end
|
43
|
+
|
44
|
+
|
45
|
+
it 'should iterate using *each* method' do
|
46
|
+
request_data = FactoryGirl.attributes_for(:skill_list, {
|
47
|
+
:total_entries => 1,
|
48
|
+
:total_pages => 1,
|
49
|
+
:skills => [FactoryGirl.attributes_for(:skill)]
|
50
|
+
}).to_json
|
51
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
52
|
+
skill_list = TheCity::SkillList.new
|
53
|
+
|
54
|
+
skills = []
|
55
|
+
skill_list.each { |skill| skills << skill.name }
|
56
|
+
skill_list.skills.should == ["Welding"]
|
57
|
+
end
|
58
|
+
|
59
|
+
|
60
|
+
it 'should iterate using *collect* method' do
|
61
|
+
request_data = FactoryGirl.attributes_for(:skill_list, {
|
62
|
+
:total_entries => 1,
|
63
|
+
:total_pages => 1,
|
64
|
+
:skills => [FactoryGirl.attributes_for(:skill)]
|
65
|
+
}).to_json
|
66
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
67
|
+
skill_list = TheCity::SkillList.new
|
68
|
+
|
69
|
+
skills = skill_list.collect { |skill| skill.name }
|
70
|
+
skill_list.skills.should == ["Welding"]
|
71
|
+
end
|
72
|
+
|
73
|
+
|
74
|
+
end
|
75
|
+
|
76
|
+
|
@@ -0,0 +1,82 @@
|
|
1
|
+
require File.join(Dir.pwd, 'spec', 'spec_helper')
|
2
|
+
|
3
|
+
describe 'SkilledUserIdList' do
|
4
|
+
|
5
|
+
before do
|
6
|
+
simulate_connection_to_server
|
7
|
+
end
|
8
|
+
|
9
|
+
after do
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
it 'should pass if skilled user list attribute is not specifed' do
|
15
|
+
skill_id = 123
|
16
|
+
request_data = FactoryGirl.attributes_for(:skilled_user_id_list).to_json
|
17
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
18
|
+
skilled_user_id_list = TheCity::SkilledUserIdList.new({:skill_id => skill_id})
|
19
|
+
|
20
|
+
skilled_user_id_list.user_ids.should == []
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
it 'should pass if skilled user list is empty' do
|
25
|
+
skill_id = 123
|
26
|
+
request_data = FactoryGirl.attributes_for(:skilled_user_id_list, :users => []).to_json
|
27
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
28
|
+
skilled_user_id_list = TheCity::SkilledUserIdList.new({:skill_id => skill_id})
|
29
|
+
|
30
|
+
skilled_user_id_list.user_ids.should == []
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
it 'should return a valid list of users' do
|
35
|
+
skill_id = 123
|
36
|
+
page = 2
|
37
|
+
request_data = FactoryGirl.attributes_for(:skilled_user_id_list, {
|
38
|
+
:total_entries => 1,
|
39
|
+
:total_pages => 1,
|
40
|
+
:user_ids => [FactoryGirl.attributes_for(:user)[:id]]
|
41
|
+
}).to_json
|
42
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
43
|
+
skilled_user_id_list = TheCity::SkilledUserIdList.new({:skill_id => skill_id, :page => page})
|
44
|
+
|
45
|
+
skilled_user_id_list.user_ids.should == [946060874]
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
it 'should iterate using *each* method' do
|
50
|
+
skill_id = 123
|
51
|
+
request_data = FactoryGirl.attributes_for(:skilled_user_id_list, {
|
52
|
+
:total_entries => 1,
|
53
|
+
:total_pages => 1,
|
54
|
+
:user_ids => [FactoryGirl.attributes_for(:user)[:id]]
|
55
|
+
}).to_json
|
56
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
57
|
+
skilled_user_id_list = TheCity::SkilledUserIdList.new({:skill_id => skill_id})
|
58
|
+
|
59
|
+
users = []
|
60
|
+
skilled_user_id_list.each { |user_id| users << user_id}
|
61
|
+
skilled_user_id_list.user_ids.should == [946060874]
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
it 'should iterate using *collect* method' do
|
66
|
+
skill_id = 123
|
67
|
+
request_data = FactoryGirl.attributes_for(:skilled_user_id_list, {
|
68
|
+
:total_entries => 1,
|
69
|
+
:total_pages => 1,
|
70
|
+
:user_ids => [FactoryGirl.attributes_for(:user)[:id]]
|
71
|
+
}).to_json
|
72
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
73
|
+
skilled_user_id_list = TheCity::SkilledUserIdList.new({:skill_id => skill_id})
|
74
|
+
|
75
|
+
users = skilled_user_id_list.collect { |user_id| user_id }
|
76
|
+
skilled_user_id_list.user_ids.should == [946060874]
|
77
|
+
end
|
78
|
+
|
79
|
+
|
80
|
+
end
|
81
|
+
|
82
|
+
|
@@ -0,0 +1,82 @@
|
|
1
|
+
require File.join(Dir.pwd, 'spec', 'spec_helper')
|
2
|
+
|
3
|
+
describe 'SkilledUserList' do
|
4
|
+
|
5
|
+
before do
|
6
|
+
simulate_connection_to_server
|
7
|
+
end
|
8
|
+
|
9
|
+
after do
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
it 'should pass if skilled user list attribute is not specifed' do
|
15
|
+
skill_id = 123
|
16
|
+
request_data = FactoryGirl.attributes_for(:skilled_user_list).to_json
|
17
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
18
|
+
skilled_user_list = TheCity::SkilledUserList.new({:skill_id => skill_id})
|
19
|
+
|
20
|
+
skilled_user_list.users.should == []
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
it 'should pass if skilled user list is empty' do
|
25
|
+
skill_id = 123
|
26
|
+
request_data = FactoryGirl.attributes_for(:skilled_user_list, :users => []).to_json
|
27
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
28
|
+
skilled_user_list = TheCity::SkilledUserList.new({:skill_id => skill_id})
|
29
|
+
|
30
|
+
skilled_user_list.users.should == []
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
it 'should return a valid list of users' do
|
35
|
+
skill_id = 123
|
36
|
+
page = 2
|
37
|
+
request_data = FactoryGirl.attributes_for(:skilled_user_list, {
|
38
|
+
:total_entries => 1,
|
39
|
+
:total_pages => 1,
|
40
|
+
:users => [FactoryGirl.attributes_for(:user)]
|
41
|
+
}).to_json
|
42
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
43
|
+
skilled_user_list = TheCity::SkilledUserList.new({:skill_id => skill_id, :page => page})
|
44
|
+
|
45
|
+
skilled_user_list.users.should == ["Sam Shepherd"]
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
it 'should iterate using *each* method' do
|
50
|
+
skill_id = 123
|
51
|
+
request_data = FactoryGirl.attributes_for(:skilled_user_list, {
|
52
|
+
:total_entries => 1,
|
53
|
+
:total_pages => 1,
|
54
|
+
:users => [FactoryGirl.attributes_for(:user)]
|
55
|
+
}).to_json
|
56
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
57
|
+
skilled_user_list = TheCity::SkilledUserList.new({:skill_id => skill_id})
|
58
|
+
|
59
|
+
users = []
|
60
|
+
skilled_user_list.each { |user| users << user.full_name }
|
61
|
+
skilled_user_list.users.should == ["Sam Shepherd"]
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
it 'should iterate using *collect* method' do
|
66
|
+
skill_id = 123
|
67
|
+
request_data = FactoryGirl.attributes_for(:skilled_user_list, {
|
68
|
+
:total_entries => 1,
|
69
|
+
:total_pages => 1,
|
70
|
+
:users => [FactoryGirl.attributes_for(:user)]
|
71
|
+
}).to_json
|
72
|
+
TheCity.stub(:admin_request).and_return( TheCityResponse.new(200, request_data) )
|
73
|
+
skilled_user_list = TheCity::SkilledUserList.new({:skill_id => skill_id})
|
74
|
+
|
75
|
+
users = skilled_user_list.collect { |user| user.full_name }
|
76
|
+
skilled_user_list.users.should == ["Sam Shepherd"]
|
77
|
+
end
|
78
|
+
|
79
|
+
|
80
|
+
end
|
81
|
+
|
82
|
+
|