noosfero | Fix fragile unit test

Antonio Terceiro gitlab at gitlab.com
Mon Jan 26 14:09:19 BRST 2015


Antonio Terceiro pushed to refs/heads/master at <a href="https://gitlab.com/noosfero/noosfero">Noosfero / noosfero</a>

Commits:
<a href="https://gitlab.com/noosfero/noosfero/commit/89c4127aa558b135e53bb904773303545c231fdf">89c4127a</a> by Antonio Terceiro
Fix fragile unit test

There is no much point in hardcoding the expected constant in the test.

- - - - -


Changes:

=====================================
test/unit/environment_test.rb
=====================================
--- a/test/unit/environment_test.rb
+++ b/test/unit/environment_test.rb
@@ -1063,7 +1063,7 @@ class EnvironmentTest < ActiveSupport::TestCase
   end
 
   should 'have a list of trusted sites by default' do
-    assert_equal ['developer.myspace.com', 'itheora.org', 'maps.google.com', 'platform.twitter.com', 'player.vimeo.com', 'stream.softwarelivre.org', 'tv.softwarelivre.org', 'www.facebook.com', 'www.flickr.com', 'www.gmodules.com', 'www.youtube.com', 'a.yimg.com', 'b.yimg.com', 'c.yimg.com', 'd.yimg.com', 'e.yimg.com', 'f.yimg.com', 'g.yimg.com', 'h.yimg.com', 'i.yimg.com', 'j.yimg.com', 'k.yimg.com', 'l.yimg.com', 'm.yimg.com', 'n.yimg.com', 'o.yimg.com', 'p.yimg.com', 'q.yimg.com', 'r.yimg.com', 's.yimg.com', 't.yimg.com', 'u.yimg.com', 'v.yimg.com', 'w.yimg.com', 'x.yimg.com', 'y.yimg.com', 'z.yimg.com'], Environment.new.trusted_sites_for_iframe
+    assert_equal [String], Environment.new.trusted_sites_for_iframe.map(&:class).uniq
   end
 
   should 'have a list of trusted sites' do

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150126/84035eeb/attachment.html>


More information about the Noosfero-dev mailing list