Sha256: 4000c1871afdb73e0d0b031817742dc8ec31f100a953d08c57ca8402c2439d16
Contents?: true
Size: 1.34 KB
Versions: 2
Compression:
Stored size: 1.34 KB
Contents
require_relative './spec_helper' describe "Edit Video" do context "when user is unauthenticated" do it_behaves_like "Unauthenticated", -> (api) do api.edit_video(test_video_id("user1"), title: "foo") end end context "Authenticated User" do context "different account" do specify do api = _api(login: user2["login"], application_token: user2["rw_token"]) expect do api.edit_video(test_video_id("user1")) end.to raise_error(Vzaar::Error, "Moved Temporarily") end end context "RW token" do before(:all) do @api = _api(login: user1["login"], application_token: user1["rw_token"]) end describe "updating params" do before(:all) do @title = rand_str() @desc = rand_str() @res = @api.edit_video(test_video_id("user1"), title: @title, description: @desc) end it_behaves_like "200 OK" specify { expect(@res.title).to eq(@title) } specify { expect(@res.description).to eq(@desc) } end end context "RO token" do it_behaves_like "RO only", user1["login"], user1["ro_token"], -> (api) do api.edit_video(test_video_id("user1"), title: "woof") end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vzaar-1.4.1 | examples/edit_video_spec.rb |
vzaar-1.3.1 | examples/edit_video_spec.rb |