salesflip-jobboersen_integration 0.3.0 → 0.3.1
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.
@@ -41,7 +41,8 @@ module ContactExtras
|
|
41
41
|
def tjb_xml
|
42
42
|
password = generate_password
|
43
43
|
{ :first_name => self.first_name, :last_name => self.last_name, :email => self.email,
|
44
|
-
:password => password, :password_confirmation => password
|
44
|
+
:password => password, :password_confirmation => password,
|
45
|
+
:account_id => self.account.tjb_id }.to_xml(:root => 'contact')
|
45
46
|
end
|
46
47
|
|
47
48
|
def generate_password
|
@@ -19,7 +19,7 @@ module JobboersenIntegration
|
|
19
19
|
Salesflip::Plugin.register(:jobboersen_integration) do
|
20
20
|
name 'JobBoersen Integration'
|
21
21
|
author 'Matt Beedle'
|
22
|
-
version '0.3.
|
22
|
+
version '0.3.1'
|
23
23
|
description 'Everything to seemlessly integrate 1000jobboersen.de'
|
24
24
|
end
|
25
25
|
|
data/test/test_helper.rb
CHANGED
@@ -23,5 +23,8 @@ Dir[ File.join(MODELS, "*.rb") ].sort.each { |file| require File.basename(file)
|
|
23
23
|
class ActiveSupport::TestCase
|
24
24
|
setup do
|
25
25
|
FakeWeb.allow_net_connect = false
|
26
|
+
Contact.send(:include, ContactExtras)
|
27
|
+
Account.send(:include, AccountExtras)
|
28
|
+
User.send(:include, UserExtras)
|
26
29
|
end
|
27
30
|
end
|
data/test/unit/account_test.rb
CHANGED
data/test/unit/contact_test.rb
CHANGED
@@ -7,7 +7,6 @@ class ContactTest < ActiveSupport::TestCase
|
|
7
7
|
:body => File.read('test/support/account_create_success.xml'))
|
8
8
|
FakeWeb.register_uri(:post, 'http://1000jobboersen.de/administration/administrators.xml',
|
9
9
|
:body => File.read('test/support/administrator_create_success.xml'))
|
10
|
-
Contact.send(:include, ContactExtras)
|
11
10
|
@user = User.create :email => 'test@test.com', :tjb_auth_token => 'La9Hbm8SnPJN-F-zUhlp'
|
12
11
|
@account = Account.create :name => 'test account', :user => @user
|
13
12
|
end
|
@@ -30,13 +29,14 @@ class ContactTest < ActiveSupport::TestCase
|
|
30
29
|
:account => @account, :user => @user
|
31
30
|
end
|
32
31
|
|
33
|
-
should 'only send first_name, last_name, email, password and
|
32
|
+
should 'only send first_name, last_name, email, password, password_confirmation and account_id in xml' do
|
34
33
|
assert_match(/first\-name/, @contact.tjb_xml)
|
35
34
|
assert_match(/last\-name/, @contact.tjb_xml)
|
36
35
|
assert_match(/email/, @contact.tjb_xml)
|
37
36
|
assert_match(/password/, @contact.tjb_xml)
|
38
37
|
assert_match(/password\-confirmation/, @contact.tjb_xml)
|
39
38
|
assert_no_match(/another\-field/, @contact.tjb_xml)
|
39
|
+
assert_match(/account\-id/, @contact.tjb_xml)
|
40
40
|
end
|
41
41
|
|
42
42
|
should 'set the tjb_id when the contact has been created in 1000jobboersen' do
|
data/test/unit/user_test.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: salesflip-jobboersen_integration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors: []
|
13
13
|
|