semantic-crawler 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/test/gdacs_test.rb DELETED
@@ -1,80 +0,0 @@
1
- require 'test_helper'
2
- require 'pp'
3
-
4
- class GdacsTest < ActiveSupport::TestCase
5
- test "truth" do
6
- assert_kind_of Module, SemanticCrawler
7
- end
8
-
9
- test "init gdacs feed" do
10
- feed = SemanticCrawler::Gdacs::Feed.new
11
- assert !feed.url.nil?
12
- end
13
-
14
- test "get channel title" do
15
- feed = SemanticCrawler::Gdacs::Feed.new
16
- assert !feed.title.nil?
17
- end
18
-
19
- test "get channel description" do
20
- feed = SemanticCrawler::Gdacs::Feed.new
21
- assert !feed.description.nil?
22
- end
23
-
24
- test "get channel pubDate" do
25
- feed = SemanticCrawler::Gdacs::Feed.new
26
- assert !feed.pubDate.nil?
27
- end
28
-
29
- test "get channel webMaster" do
30
- feed = SemanticCrawler::Gdacs::Feed.new
31
- assert feed.webMaster.to_s.include?("@")
32
- end
33
-
34
- test "get channel managingEditor" do
35
- feed = SemanticCrawler::Gdacs::Feed.new
36
- assert feed.managingEditor.to_s.include?("@")
37
- end
38
-
39
- test "get channel atom:link" do
40
- feed = SemanticCrawler::Gdacs::Feed.new
41
- assert feed.atom_link.to_s.start_with?("http")
42
- end
43
-
44
- test "get channel item(s)" do
45
- feed = SemanticCrawler::Gdacs::Feed.new
46
- items = feed.items
47
- assert !items.nil?
48
- items.each do |item|
49
- assert !item.title.nil?
50
- assert !item.description.nil?
51
- assert !item.link.nil?
52
- assert !item.pubDate.nil?
53
- assert !item.fromdate.nil?
54
- assert !item.todate.nil?
55
- assert !item.subject.nil?
56
- assert !item.guid.nil?
57
- assert !item.latitude.nil?
58
- assert !item.longitude.nil?
59
- assert !item.version.nil?
60
- assert !item.eventtype.nil?
61
- assert !item.alertlevel.nil?
62
- assert !item.eventname.nil?
63
- assert !item.eventid.nil?
64
- assert !item.episodeid.nil?
65
- assert !item.severity.nil?
66
- assert !item.population.nil?
67
- assert !item.vulnerability.nil?
68
- assert !item.country.nil?
69
- assert !item.iso3.nil?
70
- assert !item.glide.nil?
71
- resources = item.resources
72
- resources.each do |resource|
73
- assert !resource.title.nil?
74
- assert !resource.url.nil?
75
- assert !resource.type.nil?
76
- end
77
- end
78
- end
79
-
80
- end