Sha256: 7261aabd59a227eddf8f2837720a2fcc8c530eac9d59f0f4222aae3ae8883f5d

Contents?: true

Size: 983 Bytes

Versions: 2

Compression:

Stored size: 983 Bytes

Contents

require 'spec_helper'
require 'views/tasuku/taskables/illustration_spec'

describe 'tasuku/taskables/url/requests/_request.html.erb' do
  let(:user) { create :user }

  context 'for url requests that have an image or video' do
    let(:url_request) { create :url_request, image: fixture("doge.jpg"), video_url: 'https://www.youtube.com/watch?v=z9Uz1icjwrM' }

    before do
      render partial: 'tasuku/taskables/url/requests/request.html.erb', locals: {
        request: url_request,
        current_author: user
      }
    end

    alias_method :request, :url_request
    it_behaves_like 'illustrations'
  end

  context 'for url requests that have no image or video' do
    let(:url_request) { create :url_request }

    before do
      render partial: 'tasuku/taskables/url/requests/request.html.erb', locals: {
        request: url_request,
        current_author: user
      }
    end

    alias_method :request, :url_request
    it_behaves_like 'no illustrations'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tasuku-1.1.0 spec/views/tasuku/taskables/url/requests/_request.html.erb_spec.rb
tasuku-1.0.1 spec/views/tasuku/taskables/url/requests/_request.html.erb_spec.rb