adobe_connect 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +1 -1
- data/lib/adobe_connect/user.rb +3 -0
- data/lib/adobe_connect/version.rb +1 -1
- data/test/lib/adobe_connect/user_test.rb +17 -0
- metadata +4 -4
data/README.md
CHANGED
data/lib/adobe_connect/user.rb
CHANGED
@@ -49,6 +49,7 @@ module AdobeConnect
|
|
49
49
|
:email => app_user.email)
|
50
50
|
|
51
51
|
if response.at_xpath('//status').attr('code') == 'ok'
|
52
|
+
self.id = response.at_xpath('//principal').attr('principal-id')
|
52
53
|
true
|
53
54
|
else
|
54
55
|
save_errors(response)
|
@@ -86,6 +87,8 @@ module AdobeConnect
|
|
86
87
|
end
|
87
88
|
|
88
89
|
private
|
90
|
+
attr_writer :id
|
91
|
+
|
89
92
|
# Internal: Store request errors in @errors.
|
90
93
|
#
|
91
94
|
# response - An AdobeConnect::Response.
|
@@ -50,6 +50,23 @@ class AdobeConnectUserTest < MiniTest::Unit::TestCase
|
|
50
50
|
assert @connect_user.save
|
51
51
|
end
|
52
52
|
|
53
|
+
def test_save_stores_the_principal_id_on_the_user
|
54
|
+
response = mock(:code => '200')
|
55
|
+
response.expects(:body).returns(SAVE_SUCCESS)
|
56
|
+
ac_response = AdobeConnect::Response.new(response)
|
57
|
+
|
58
|
+
@connect_user.service.expects(:principal_update).
|
59
|
+
with(:first_name => @app_user.first_name,
|
60
|
+
:last_name => @app_user.last_name, :login => @connect_user.username,
|
61
|
+
:password => @connect_user.password, :type => 'user', :has_children => 0,
|
62
|
+
:email => @app_user.email).
|
63
|
+
returns(ac_response)
|
64
|
+
|
65
|
+
@connect_user.save
|
66
|
+
|
67
|
+
assert_equal "26243", @connect_user.id
|
68
|
+
end
|
69
|
+
|
53
70
|
def test_save_returns_false_on_failure
|
54
71
|
response = mock(:code => '200')
|
55
72
|
response.expects(:body).returns(SAVE_ERROR)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adobe_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 8
|
10
|
+
version: 0.0.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Zach Pendleton
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2013-
|
18
|
+
date: 2013-03-09 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: activesupport
|