From 82367a81c96d53f81884c728c7e128a83d8789f8 Mon Sep 17 00:00:00 2001 From: erwanlr Date: Fri, 12 Sep 2014 12:50:46 +0200 Subject: [PATCH] Deletes the json spec (files to test not longer in the repo) --- spec/json_checks_spec.rb | 45 ---------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 spec/json_checks_spec.rb diff --git a/spec/json_checks_spec.rb b/spec/json_checks_spec.rb deleted file mode 100644 index 42cae84c..00000000 --- a/spec/json_checks_spec.rb +++ /dev/null @@ -1,45 +0,0 @@ -# encoding: UTF-8 - -require 'spec_helper' - -describe 'JSON checks' do - - after :each do - expect(FileTest.exists?(@file)).to be_truthy - expect { JSON.parse(File.open(@file).read) }.not_to raise_error - end - - it 'check plugin_vulns.json for syntax errors' do - @file = PLUGINS_VULNS_FILE - end - - it 'check theme_vulns.json for syntax errors' do - @file = THEMES_VULNS_FILE - end - - it 'check wp_vulns.json for syntax errors' do - @file = WP_VULNS_FILE - end -end - -describe 'JSON content' do - before :all do - @vuln_plugins = json(PLUGINS_VULNS_FILE) - @vuln_themes = json(THEMES_VULNS_FILE) - @vulnerabilities = @vuln_plugins + @vuln_themes - end - - after :each do - expect(@result.size).to eq(0), "Items:\n#{@result.join("\n")}" - end - - it 'each asset vuln needs a title node' do - @result = [] - - @vulnerabilities.each do |plugin| - plugin[plugin.keys.inject]['vulnerabilities'].each do |vulnerability| - @result << vulnerability['title'] if vulnerability['title'].nil? - end - end - end -end