spec/metric/track_spec.rb in metric-0.1.0 vs spec/metric/track_spec.rb in metric-0.1.1
- old
+ new
@@ -17,11 +17,11 @@
end
Metric::Track.compose("hits").should == "http://api.metric.io/v1/sites/spec/track?metric=hits"
end
it "encodes the input" do
- result = "https://api.metric.io/v1/sites/spec/track?metric=hits+and+spaces"
+ result = "https://api.metric.io/v1/sites/spec/track?metric=hits%20and%20spaces"
Metric::Track.compose("hits and spaces").should == result
end
it "sends custom amount" do
result = "https://api.metric.io/v1/sites/spec/track?metric=hits&amount=42"
@@ -37,15 +37,10 @@
result = "https://api.metric.io/v1/sites/spec/track?metric=hits&date=20120101"
Metric::Track.compose("hits", :date => "20120101").should == result
end
it "passes in meta information" do
- result = "https://api.metric.io/v1/sites/spec/track?metric=payment&meta=userid%3A+1"
+ result = "https://api.metric.io/v1/sites/spec/track?metric=payment&meta=userid%3A%201"
Metric::Track.compose("payment", :meta => "userid: 1").should == result
- end
-
- it "sends trigger param" do
- result = "https://api.metric.io/v1/sites/spec/track?metric=hits&trigger=1"
- Metric::Track.compose("hits", :trigger => true).should == result
end
end