Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

other_id can be a string #63

Merged
merged 3 commits into from

2 participants

@Shumkov

other_id can be a string (MongoId for example) and Pivotal Tracker accept this

@Shumkov Shumkov other_id can be a string
other_id can be a string (MongoId for example) and Pivotal Tracker accept this
123f242
@jasonnoble
Collaborator

Ivan, can you add a spec that covers this case?

@Shumkov

Sorry, but i don't have experience with spec. Did you help me?

@jasonnoble
Collaborator

Something like:

diff --git a/spec/pivotal-tracker/story_spec.rb b/spec/p
index 9d52b6b..c447197 100644
--- a/spec/pivotal-tracker/story_spec.rb
+++ b/spec/pivotal-tracker/story_spec.rb
@@ -185,8 +185,13 @@ describe PivotalTracker::Story do
         story_for(:labels => "abc")["labels"].should ==
       end

-      it "should include other_id" do
-        story_for(:other_id => 10)["other_id"].should =
+      describe "should include other_id" do
+        it "when passed a string" do
+          story_for(:other_id => "10")["other_id"].shou
+        end
+        it "when passed an integer" do
+          story_for(:other_id => 10)["other_id"].should
+        end
       end

       it "should include integration_id" do
@Shumkov

@jasonnoble Thank you, done.

@Shumkov

Why you don't merge PR?

@jasonnoble jasonnoble merged commit d5e5fb9 into from
@jasonnoble
Collaborator

This will be in 0.5.11, unfortunately, Rubygems.org is currently in maintenance mode. I'll try to push again later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 3, 2012
  1. @Shumkov

    other_id can be a string

    Shumkov authored
    other_id can be a string (MongoId for example) and Pivotal Tracker accept this
Commits on Nov 26, 2012
  1. @Shumkov
  2. @Shumkov
This page is out of date. Refresh to see the latest.
View
2  lib/pivotal-tracker/story.rb
@@ -39,7 +39,7 @@ def find(param, project_id)
element :labels, String
element :jira_id, Integer
element :jira_url, String
- element :other_id, Integer
+ element :other_id, String
element :integration_id, Integer
element :deadline, DateTime # Only available for Release stories
View
9 spec/pivotal-tracker/story_spec.rb
@@ -185,8 +185,13 @@ def story_for(attrs)
story_for(:labels => "abc")["labels"].should == "abc"
end
- it "should include other_id" do
- story_for(:other_id => 10)["other_id"].should == "10"
+ describe "should include other_id" do
+ it "when passed a string" do
+ story_for(:other_id => "aa10bb")["other_id"].should == "aa10bb"
+ end
+ it "when passed an integer" do
+ story_for(:other_id => 10)["other_id"].should == "10"
+ end
end
it "should include integration_id" do
Something went wrong with that request. Please try again.