spec/entry_spec.rb in kaltura_box-0.0.1 vs spec/entry_spec.rb in kaltura_box-0.0.2

- old
+ new

@@ -13,9 +13,26 @@ let(:videos) { Video.video_list } context "video_list" do it { expect(videos.class).to eq Array } + + describe "searching" do + + context "valid search" do + it "returns an array" do + expect(Video.video_list("education").class).to eq Array + end + end + + context "invalid search" do + it "returns nil" do + expect(Video.video_list("blabla")).to be_nil + end + end + + end + end context "update all videos" do before(:each) { KalturaBoxTest.setup_db! } it { expect{Video.update_all_videos!}.to change{Video.count}.from(0).to(videos.count) }