forked from rnz0/rgeoserver
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Darren Hardy
committed
Sep 15, 2016
1 parent
6d819e5
commit e760d27
Showing
7 changed files
with
165 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
require 'rgeo' | ||
require 'rgeo/shapefile' | ||
require 'zip/zip' | ||
require 'zip' | ||
|
||
module RGeoServer | ||
class ShapefileInfo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,69 @@ | ||
require 'spec_helper' | ||
require 'awesome_print' | ||
|
||
describe RGeoServer::GeoServerUrlHelpers do | ||
|
||
before(:each) do | ||
@c = RGeoServer::Catalog.new | ||
@w = @c.get_workspace 'druid' | ||
@w_default = @c.get_default_workspace | ||
ap({ :catalog => @c, :workspace_druid => @w, :workspace_default => @w_default }) if $DEBUG | ||
end | ||
|
||
describe RGeoServer::Catalog do | ||
describe "Init" do | ||
it "catalog" do | ||
@c.config.include?(:url).should == true | ||
@c.headers.include?(:content_type).should == true | ||
end | ||
|
||
it "workspace" do | ||
@w.name.should == 'druid' | ||
@w_default.name.should == @w.name | ||
subject.config.include?(:url).should == true | ||
subject.headers.include?(:content_type).should == true | ||
end | ||
end | ||
|
||
describe "#url_for" do | ||
it "simple" do | ||
@c.respond_to?('url_for').should == true | ||
subject.respond_to?('url_for').should == true | ||
end | ||
end | ||
|
||
describe "Workspace" do | ||
before(:each) do | ||
@w = subject.get_workspace 'druid' | ||
@w_default = subject.get_default_workspace | ||
ap({ :catalog => subject, :workspace_druid => @w, :workspace_default => @w_default }) if $DEBUG | ||
end | ||
|
||
it "workspace" do | ||
@w.name.should == 'druid' | ||
@w_default.name.should == @w.name | ||
end | ||
|
||
it "#get_workspaces as array" do | ||
@w_all = @c.get_workspaces | ||
@w_all = subject.get_workspaces | ||
@w_all.size.should > 0 | ||
end | ||
|
||
it "#get_workspaces as block" do | ||
@c.get_workspaces do |w| | ||
subject.get_workspaces do |w| | ||
w.name.length.should > 0 | ||
end | ||
end | ||
end | ||
|
||
describe "Layers" do | ||
it "#get_layers" do | ||
@c.get_layers.size.should > 0 | ||
@c.get_layers.each do |l| | ||
it "#each_layer" do | ||
subject.each_layer.to_a.size.should > 0 | ||
subject.each_layer do |l| | ||
# ap l.resource | ||
end | ||
end | ||
end | ||
|
||
describe "DataStore" do | ||
it "#get_data_stores" do | ||
@c.get_data_stores.size.should > 0 | ||
subject.get_data_stores.size.should > 0 | ||
end | ||
end | ||
|
||
describe "CoverageStore" do | ||
it "#get_coverage_stores" do | ||
@c.get_coverage_stores.size.should > 0 | ||
subject.get_coverage_stores.size.should > 0 | ||
end | ||
end | ||
|
||
describe "WMSStore" do | ||
it "#get_wms_stores" do | ||
@c.get_wms_stores.size.should > 0 | ||
subject.get_wms_stores.size.should > 0 | ||
end | ||
end | ||
end | ||
|
||
end |
Oops, something went wrong.