Commit cf48d6e22f32313813d9e4a554ef67b2a09fcdb9
1 parent
4b037dac
Exists in
software_as_organization
fix functional tests
Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com> Signed-off-by: Marcos Ronaldo <marcos.rpj2@gmail.com>
Showing
2 changed files
with
5 additions
and
5 deletions
Show diff stats
src/noosfero-spb/software_communities/test/functional/profile_controller_test.rb
@@ -10,12 +10,12 @@ class ProfileControllerTest < ActionController::TestCase | @@ -10,12 +10,12 @@ class ProfileControllerTest < ActionController::TestCase | ||
10 | 10 | ||
11 | def setup | 11 | def setup |
12 | Environment.default.enable('products_for_enterprises') | 12 | Environment.default.enable('products_for_enterprises') |
13 | - @profile = create_user('testuser').person | 13 | + @profile = create_person('testuser') |
14 | end | 14 | end |
15 | attr_reader :profile | 15 | attr_reader :profile |
16 | 16 | ||
17 | should 'not count a visit twice for the same user' do | 17 | should 'not count a visit twice for the same user' do |
18 | - profile = create_user('someone').person | 18 | + profile = create_person('someone') |
19 | login_as(@profile.identifier) | 19 | login_as(@profile.identifier) |
20 | software = create_software_info("a software").software | 20 | software = create_software_info("a software").software |
21 | 21 | ||
@@ -29,7 +29,7 @@ class ProfileControllerTest < ActionController::TestCase | @@ -29,7 +29,7 @@ class ProfileControllerTest < ActionController::TestCase | ||
29 | end | 29 | end |
30 | 30 | ||
31 | should 'not count a visit twice for unlogged users' do | 31 | should 'not count a visit twice for unlogged users' do |
32 | - profile = create_user('someone').person | 32 | + profile = create_person('someone') |
33 | software = create_software_info("a software").software | 33 | software = create_software_info("a software").software |
34 | 34 | ||
35 | get :index, :profile => software.identifier | 35 | get :index, :profile => software.identifier |
src/noosfero-spb/software_communities/test/helpers/plugin_test_helper.rb
@@ -22,7 +22,7 @@ module PluginTestHelper | @@ -22,7 +22,7 @@ module PluginTestHelper | ||
22 | software_info | 22 | software_info |
23 | end | 23 | end |
24 | 24 | ||
25 | - def create_person name, email, password, password_confirmation, state, city | 25 | + def create_person name, email="test@test.com", password='test', password_confirmation='test', state='df', city='gama' |
26 | user = create_user( | 26 | user = create_user( |
27 | name.to_slug, | 27 | name.to_slug, |
28 | email, | 28 | email, |
@@ -45,7 +45,7 @@ module PluginTestHelper | @@ -45,7 +45,7 @@ module PluginTestHelper | ||
45 | person | 45 | person |
46 | end | 46 | end |
47 | 47 | ||
48 | - def create_user login, email, password, password_confirmation | 48 | + def create_user login, email="test@test.com", password='test', password_confirmation='test' |
49 | user = User.new | 49 | user = User.new |
50 | 50 | ||
51 | user.login = login | 51 | user.login = login |