Sha256: e1b9cbd825ed842b614af2e6d7c0ee88e74632eac08760b6d6286963265abf86
Contents?: true
Size: 1.48 KB
Versions: 2
Compression:
Stored size: 1.48 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe TaskMapper::Provider::Bugzilla::Project do before(:all) do @core = {:id => 1, :name => 'Core'} @projects = [@core] @klass = TaskMapper::Provider::Bugzilla::Project end before(:each) do VCR.use_cassette('project-initialization') { @taskmapper = TaskMapper.new(:bugzilla, {:username => 'george.rafael@gmail.com', :password => '123456', :url =>'https://landfill.bugzilla.org/bugzilla-3.6-branch/'}) } end it "should be able to load all projects" do VCR.use_cassette('load-all-projects') { @projects = @taskmapper.projects } @projects.should be_an_instance_of(Array) @projects.first.should be_an_instance_of(@klass) end it "should be able to load projects using an array of id's" do VCR.use_cassette('projects-by-ids') { @projects = @taskmapper.projects([1,2,3]) } @projects.should be_an_instance_of(Array) @projects.first.should be_an_instance_of(@klass) @projects.first.name.should == 'WorldControl' end it "should be able to find a project by id" do VCR.use_cassette('projects-by-id') { @project = @taskmapper.project(1) } @project.should be_an_instance_of(@klass) @project.name.should == 'WorldControl' end it "should be able to load project using the find method" do VCR.use_cassette('project-by-find-method') { @project = @taskmapper.project.find(1) } @project.should be_an_instance_of(@klass) @project.name.should == 'WorldControl' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
taskmapper-bugzilla-0.4.0 | spec/projects_spec.rb |
taskmapper-bugzilla-0.3.0 | spec/projects_spec.rb |