Commit 7ba0055ecfc6593d5765eeb43fc3aaac9505774d

Authored by Rodrigo Souto
1 parent 24c76fe1

[plugins-tests] Fixing stoa tests (one test still failing)

plugins/stoa/install.rb
1   -raise "Not ready yet"
  1 +#FIXME one functional test is failing
  2 +raise "Not ready yet..."
  3 +
  4 +require 'fileutils'
  5 +
  6 +config_path = File.join('plugins', 'stoa', 'config.yml')
  7 +config_template = File.join('plugins', 'stoa', 'config.yml.dist')
  8 +FileUtils.cp(config_template, config_path) if !File.exist?(config_path)
... ...
plugins/stoa/lib/ext/person.rb
... ... @@ -16,7 +16,7 @@ class Person
16 16 end
17 17  
18 18 def invitation_task
19   - Task.pending.find(:first, :conditions => {:code => invitation_code}) ||
20   - Task.finished.find(:first, :conditions => {:code => invitation_code, :target_id => id})
  19 + Task.pending.find(:first, :conditions => {:code => invitation_code.to_s}) ||
  20 + Task.finished.find(:first, :conditions => {:code => invitation_code.to_s, :target_id => id})
21 21 end
22 22 end
... ...
plugins/stoa/test/functional/profile_editor_controller_test.rb
... ... @@ -36,7 +36,7 @@ class StoaPluginProfileEditorControllerTest < ActionController::TestCase
36 36 end
37 37  
38 38 should 'not display field if profile is an organization' do
39   - organization = fast_create(Organization)
  39 + organization = fast_create(Community)
40 40 organization.add_admin @person
41 41 get :edit, :profile => organization.identifier
42 42 assert_no_tag_in_string @response.body, :tag => 'label', :content => /USP number/, :attributes => { :for => 'usp_id_field' }
... ...