Sha256: a7c7c64d6a6d004f35942eba2fec7f8177885c4010bc7e2add4f93ceb73d5e97
Contents?: true
Size: 1.5 KB
Versions: 4
Compression:
Stored size: 1.5 KB
Contents
# encoding: utf-8 require "spec_helper" describe Jiralicious, "search" do before :each do Jiralicious.configure do |config| config.username = "jstewart" config.password = "topsecret" config.uri = "http://localhost" config.auth_type = :cookie config.api_version = "latest" end FakeWeb.register_uri(:get, "#{Jiralicious.rest_path}/project/", :status => "200", :body => projects_json) FakeWeb.register_uri(:get, "#{Jiralicious.rest_path}/project/EX", :status => "200", :body => project_json) FakeWeb.register_uri(:get, "#{Jiralicious.rest_path}/project/ABC", :status => "200", :body => project_json) FakeWeb.register_uri(:post, "#{Jiralicious.rest_path}/search", :status => "200", :body => project_issue_list_json) end it "finds all projects" do projects = Jiralicious::Project.all projects.should be_instance_of(Jiralicious::Project) projects.count.should == 2 projects.EX.id.should == "10000" end it "finds project issue list class level" do issues = Jiralicious::Project.issue_list("EX") issues.should be_instance_of(Jiralicious::Issue) issues.count.should == 2 issues.EX_1['id'].should == "10000" end it "finds project issue list instance level" do project = Jiralicious::Project.find("EX") issues = project.issues issues.should be_instance_of(Jiralicious::Issue) issues.count.should == 2 issues.EX_1['id'].should == "10000" end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
jiralicious-0.3.0 | spec/project_spec.rb |
jiralicious-0.2.2 | spec/project_spec.rb |
jiralicious-0.2.1 | spec/project_spec.rb |
jiralicious-0.2.0 | spec/project_spec.rb |