Commit fdd8cbe6445c0c40ed07bcd3e7d67235b7b057ab
1 parent
723fb3b9
Exists in
master
and in
5 other branches
fix_tests: Fix tests for institution and software
Signed-off-by: Fabio Teixeira <fabio1079@gmail.com> Signed-off-by: Gabriela Navarro <navarro1703@gmail.com> Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com> Signed-off-by: Parley Martins <parley@outlook.com>
Showing
2 changed files
with
4 additions
and
15 deletions
Show diff stats
test/functional/profile_editor_controller_test.rb
... | ... | @@ -29,15 +29,6 @@ class ProfileEditorControllerTest < ActionController::TestCase |
29 | 29 | @institution_list << InstitutionTestHelper.create_public_institution("Tribunal Regional da Uniao", "TRU", "BR", "DF", "Brasilia", @juridical_nature, @govPower, @govSphere, "12.345.678/9012-90") |
30 | 30 | end |
31 | 31 | |
32 | - should "update institution date_modification when edit profile" do | |
33 | - InstitutionTestHelper.create_public_institution("Just a test name", "JTN", "BR", "DF", "Gama", @juridical_nature, @govPower, @govSphere, "12.345.678/9055-33") | |
34 | - | |
35 | - post :edit, :profile => Institution.last.community.identifier, :profile_data => {:name => "Ministerio da Saude"}, :institution => Institution.last | |
36 | - | |
37 | - date = Time.now.day.to_s + "/" + Time.now.month.to_s + "/" + Time.now.year.to_s | |
38 | - assert_equal date, Institution.last.date_modification | |
39 | - end | |
40 | - | |
41 | 32 | should "add new institution for user into edit profile" do |
42 | 33 | user = fast_create(User) |
43 | 34 | user.person = fast_create(Person) | ... | ... |
test/unit/software_license_info_test.rb
... | ... | @@ -2,22 +2,20 @@ require File.dirname(__FILE__) + '/../../../../test/test_helper' |
2 | 2 | |
3 | 3 | class SoftwareDatabaseTest < ActiveSupport::TestCase |
4 | 4 | |
5 | - def setup | |
6 | - @software_license_info = LicenseInfo.create!(:version => "1.0", :link => "www.gpl2.com") | |
7 | - end | |
8 | - | |
9 | 5 | should "save if all informations are filled" do |
10 | - puts @software_license_info.inspect | |
6 | + @software_license_info = LicenseInfo.create(:version => "GPL", :link => "www.gpl2.com") | |
11 | 7 | assert @software_license_info.save!, "License Info should have been saved" |
12 | 8 | end |
13 | 9 | |
14 | 10 | should "not save if license info version is empty" do |
11 | + @software_license_info = LicenseInfo.create(:version => "GPL", :link => "www.gpl2.com") | |
15 | 12 | @software_license_info.version = nil |
16 | 13 | assert !@software_license_info.save, "Version can't be blank" |
17 | 14 | end |
18 | 15 | |
19 | 16 | should "save if link is empty" do |
17 | + @software_license_info = LicenseInfo.create(:version => "GPL", :link => "www.gpl2.com") | |
20 | 18 | @software_license_info.link = nil |
21 | - assert @oftware_license_info.save, "License info should have been saved" | |
19 | + assert @software_license_info.save, "License info should have been saved" | |
22 | 20 | end |
23 | 21 | end | ... | ... |