Sha256: 39d3ffeab2d0960b14b80ecc65f560aec58c84799696c3ec34f7b7bfa7e5b396

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

require_relative './spec_helper'

describe "Upload Thumbnail" 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 "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

1 entries across 1 versions & 1 rubygems

Version Path
vzaar-1.3.0 examples/edit_video_spec.rb