whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Additional tests
Date Thu, 24 Oct 2019 16:14:34 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new aab7ac6  Additional tests
aab7ac6 is described below

commit aab7ac60bbcbc80c4d5b9b6e56b7fa2acba1437e
Author: Sebb <sebb@apache.org>
AuthorDate: Thu Oct 24 17:14:30 2019 +0100

    Additional tests
---
 lib/spec/lib/site_spec.rb | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/lib/spec/lib/site_spec.rb b/lib/spec/lib/site_spec.rb
index f1cb5bc..f587519 100644
--- a/lib/spec/lib/site_spec.rb
+++ b/lib/spec/lib/site_spec.rb
@@ -25,6 +25,13 @@ describe ASF::Site do
       expect(res.class).to eq(Hash) 
       expect(res[:site]).to match(%r{https?://httpd\.apache\.org/?})
     end
+
+    it "should return hash for 'comdev'" do
+      res = ASF::Site.find('comdev')
+      expect(res.class).to eq(Hash) 
+      expect(res[:site]).to match(%r{https?://community\.apache\.org/?}) 
+    end
+
   end
 
   describe "ASF::Site.appendtlp" do
@@ -33,9 +40,18 @@ describe ASF::Site do
     input = File.read(file)
     it "should fail for 'httpd'" do
       res = nil
-      expect { res = ASF::Site.appendtlp(input,'httpd','description') }.to output("_WARN
Entry for 'httpd' already exists under :tlps\n").to_stderr
+      # Wunderbar.logger = nil; is needed to ensure logging output works as expected
+      expect { Wunderbar.logger = nil; res = ASF::Site.appendtlp(input,'httpd','description')
}.to output("_WARN Entry for 'httpd' already exists under :tlps\n").to_stderr
+      expect(res).to equal(input)
+    end    
+
+    it "should fail for 'comdev'" do
+      res = nil
+      # Wunderbar.logger = nil; is needed to ensure logging output works as expected
+      expect { Wunderbar.logger = nil; res = ASF::Site.appendtlp(input,'comdev','description')
}.to output("_WARN Entry for 'comdev' already exists under :cttees\n").to_stderr
       expect(res).to equal(input)
     end    
+    
     pmc = 'a-b-c'
     it "should succeed for '#{pmc}'" do
       res = nil


Mime
View raw message