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 | 10 | |
11 | 11 | def setup |
12 | 12 | Environment.default.enable('products_for_enterprises') |
13 | - @profile = create_user('testuser').person | |
13 | + @profile = create_person('testuser') | |
14 | 14 | end |
15 | 15 | attr_reader :profile |
16 | 16 | |
17 | 17 | should 'not count a visit twice for the same user' do |
18 | - profile = create_user('someone').person | |
18 | + profile = create_person('someone') | |
19 | 19 | login_as(@profile.identifier) |
20 | 20 | software = create_software_info("a software").software |
21 | 21 | |
... | ... | @@ -29,7 +29,7 @@ class ProfileControllerTest < ActionController::TestCase |
29 | 29 | end |
30 | 30 | |
31 | 31 | should 'not count a visit twice for unlogged users' do |
32 | - profile = create_user('someone').person | |
32 | + profile = create_person('someone') | |
33 | 33 | software = create_software_info("a software").software |
34 | 34 | |
35 | 35 | get :index, :profile => software.identifier | ... | ... |
src/noosfero-spb/software_communities/test/helpers/plugin_test_helper.rb
... | ... | @@ -22,7 +22,7 @@ module PluginTestHelper |
22 | 22 | software_info |
23 | 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 | 26 | user = create_user( |
27 | 27 | name.to_slug, |
28 | 28 | email, |
... | ... | @@ -45,7 +45,7 @@ module PluginTestHelper |
45 | 45 | person |
46 | 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 | 49 | user = User.new |
50 | 50 | |
51 | 51 | user.login = login | ... | ... |