spec/project_spec.rb in jiralicious-0.4.3 vs spec/project_spec.rb in jiralicious-0.5.0
- old
+ new
@@ -1,9 +1,9 @@
# encoding: utf-8
require "spec_helper"
-describe Jiralicious, "search" do
+describe Jiralicious, "Project Management Class: " do
before :each do
Jiralicious.configure do |config|
config.username = "jstewart"
config.password = "topsecret"
@@ -19,10 +19,18 @@
FakeWeb.register_uri(:get,
"#{Jiralicious.rest_path}/project/EX",
:status => "200",
:body => project_json)
FakeWeb.register_uri(:get,
+ "#{Jiralicious.rest_path}/project/EX/components",
+ :status => "200",
+ :body => project_componets_json)
+ FakeWeb.register_uri(:get,
+ "#{Jiralicious.rest_path}/project/EX/versions",
+ :status => "200",
+ :body => project_versions_json)
+ FakeWeb.register_uri(:get,
"#{Jiralicious.rest_path}/project/ABC",
:status => "200",
:body => project_json)
FakeWeb.register_uri(:post,
"#{Jiralicious.rest_path}/search",
@@ -50,6 +58,21 @@
issues.should be_instance_of(Jiralicious::Issue)
issues.count.should == 2
issues.EX_1['id'].should == "10000"
end
-end
+ it "finds project componets" do
+ components = Jiralicious::Project.components("EX")
+ components.count.should == 2
+ components.id_10000.name.should == "Component 1"
+ components.id_10050.name.should == "PXA"
+ end
+
+ it "finds project versions" do
+ versions = Jiralicious::Project.versions("EX")
+ versions.count.should == 2
+ versions.id_10000.name.should == "New Version 1"
+ versions.id_10000.overdue.should == true
+ versions.id_10010.name.should == "Next Version"
+ versions.id_10010.overdue.should == false
+ end
+end
\ No newline at end of file