diff options
author | 2011-02-21 10:31:40 +0100 | |
---|---|---|
committer | 2011-02-21 10:31:40 +0100 | |
commit | 3944521345a3b2f118ef9f746d0da32d9f3e521a (patch) | |
tree | 4d9aec77e4a56bb275149269dc7dd668ae15a335 /test/unit | |
parent | Better fixtures (diff) | |
download | glsamaker-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.rb | 9 |
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 |