Commit 3fc5784bf2193ad81ccc068014461dbbfc550379
Committed by
Rafael Martins
1 parent
511a0c1b
Exists in
master
and in
29 other branches
Fixed unit and functionals
Showing
3 changed files
with
4 additions
and
3 deletions
Show diff stats
app/models/article.rb
test/functional/enterprise_registration_controller_test.rb
... | ... | @@ -52,7 +52,7 @@ all_fixtures |
52 | 52 | env = Environment.default |
53 | 53 | env.organization_approval_method = :none |
54 | 54 | env.save |
55 | - region = fast_create(Region) | |
55 | + region = fast_create(Region, {}, :search => true) | |
56 | 56 | |
57 | 57 | data = { :name => 'My new enterprise', :identifier => 'mynew', :region => region } |
58 | 58 | create_enterprise = CreateEnterprise.new(data) | ... | ... |
test/unit/article_test.rb
... | ... | @@ -1562,10 +1562,10 @@ class ArticleTest < ActiveSupport::TestCase |
1562 | 1562 | end |
1563 | 1563 | |
1564 | 1564 | should 'survive to a invalid src attribute while looking for images in body' do |
1565 | - domain = Environment.default.domains.first.name | |
1565 | + domain = Environment.default.domains.first || Domain.new(:name => 'localhost') | |
1566 | 1566 | article = Article.new(:body => "An article with invalid src in img tag <img src='path with spaces.png' />", :profile => @profile) |
1567 | 1567 | assert_nothing_raised URI::InvalidURIError do |
1568 | - assert_equal ["http://#{domain}/path%20with%20spaces.png"], article.body_images_paths | |
1568 | + assert_equal ["http://#{domain.name}/path%20with%20spaces.png"], article.body_images_paths | |
1569 | 1569 | end |
1570 | 1570 | end |
1571 | 1571 | ... | ... |