forked from sumoheavy/jira-ruby
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Greg Signal
committed
Jan 10, 2012
1 parent
503d2a1
commit 02de744
Showing
7 changed files
with
101 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module JIRA | ||
module Resource | ||
|
||
class IssuetypeFactory < BaseFactory ; end | ||
|
||
class Issuetype < Base ; end | ||
|
||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
require 'spec_helper' | ||
|
||
describe JIRA::Resource::Issuetype do | ||
|
||
let(:client) do | ||
client = JIRA::Client.new('foo', 'bar') | ||
client.set_access_token('abc', '123') | ||
client | ||
end | ||
|
||
let(:key) { "5" } | ||
|
||
let(:expected_attributes) do | ||
{ | ||
'self' => "http://localhost:2990/jira/rest/api/2/issuetype/5", | ||
'id' => key, | ||
'name' => 'Sub-task' | ||
} | ||
end | ||
|
||
let(:expected_collection_length) { 5 } | ||
|
||
it_should_behave_like "a resource" | ||
it_should_behave_like "a resource with a collection GET endpoint" | ||
it_should_behave_like "a resource with a singular GET endpoint" | ||
|
||
end |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[ | ||
{ | ||
"self": "http://localhost:2990/jira/rest/api/2/issuetype/5", | ||
"id": "5", | ||
"description": "The sub-task of the issue", | ||
"iconUrl": "http://localhost:2990/jira/images/icons/issue_subtask.gif", | ||
"name": "Sub-task", | ||
"subtask": true | ||
}, | ||
{ | ||
"self": "http://localhost:2990/jira/rest/api/2/issuetype/4", | ||
"id": "4", | ||
"description": "An improvement or enhancement to an existing feature or task.", | ||
"iconUrl": "http://localhost:2990/jira/images/icons/improvement.gif", | ||
"name": "Improvement", | ||
"subtask": false | ||
}, | ||
{ | ||
"self": "http://localhost:2990/jira/rest/api/2/issuetype/3", | ||
"id": "3", | ||
"description": "A task that needs to be done.", | ||
"iconUrl": "http://localhost:2990/jira/images/icons/task.gif", | ||
"name": "Task", | ||
"subtask": false | ||
}, | ||
{ | ||
"self": "http://localhost:2990/jira/rest/api/2/issuetype/1", | ||
"id": "1", | ||
"description": "A problem which impairs or prevents the functions of the product.", | ||
"iconUrl": "http://localhost:2990/jira/images/icons/bug.gif", | ||
"name": "Bug", | ||
"subtask": false | ||
}, | ||
{ | ||
"self": "http://localhost:2990/jira/rest/api/2/issuetype/2", | ||
"id": "2", | ||
"description": "A new feature of the product, which has yet to be developed.", | ||
"iconUrl": "http://localhost:2990/jira/images/icons/newfeature.gif", | ||
"name": "New Feature", | ||
"subtask": false | ||
} | ||
] |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"self": "http://localhost:2990/jira/rest/api/2/issuetype/5", | ||
"id": "5", | ||
"description": "The sub-task of the issue", | ||
"iconUrl": "http://localhost:2990/jira/images/icons/issue_subtask.gif", | ||
"name": "Sub-task", | ||
"subtask": true | ||
} |