spec/lib/quandl/client/dataset_spec.rb in quandl_client-2.4.1 vs spec/lib/quandl/client/dataset_spec.rb in quandl_client-2.4.2
- old
+ new
@@ -3,9 +3,25 @@
describe Dataset do
let(:dataset){ create(:dataset) }
subject{ dataset }
+ describe ".find" do
+ subject{ Dataset.find(query) }
+ context "given nil" do
+ let(:query){ nil }
+ it{ should be_nil }
+ end
+ context "given empty string" do
+ let(:query){ '' }
+ it{ should be_nil }
+ end
+ context "given non-code value" do
+ let(:query){ '/' }
+ it{ should be_nil }
+ end
+ end
+
describe ".touch_existing(:id)" do
it "should touch the dataset" do
dataset.updated_at
sleep(1)
Dataset.touch_existing(subject.id).should eq true
\ No newline at end of file