summaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2011-02-21 10:31:40 +0100
committerAlex Legler <alex@a3li.li>2011-02-21 10:31:40 +0100
commit3944521345a3b2f118ef9f746d0da32d9f3e521a (patch)
tree4d9aec77e4a56bb275149269dc7dd668ae15a335 /test/unit
parentBetter fixtures (diff)
downloadglsamaker-3944521345a3b2f118ef9f746d0da32d9f3e521a.tar.gz
glsamaker-3944521345a3b2f118ef9f746d0da32d9f3e521a.tar.bz2
glsamaker-3944521345a3b2f118ef9f746d0da32d9f3e521a.zip
Add CVE#url method to get links to CVE info (NVD and MITRE currently)
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/cve_test.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/unit/cve_test.rb b/test/unit/cve_test.rb
index 0ee5658..252c651 100644
--- a/test/unit/cve_test.rb
+++ b/test/unit/cve_test.rb
@@ -1,8 +1,11 @@
require 'test_helper'
class CVETest < ActiveSupport::TestCase
- # Replace this with your real tests.
- test "the truth" do
- assert true
+ test "URL generation" do
+ cve = cves(:cve_one)
+
+ assert cve.url, 'http://nvd.nist.gov/nvd.cfm?cvename=CVE-2004-1776'
+ assert cve.url(:nvd), 'http://nvd.nist.gov/nvd.cfm?cvename=CVE-2004-1776'
+ assert cve.url(:mitre), 'http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-1776'
end
end