Sha256: 1beb7ce53b7993d971af61782f64b4c9e54fc5d7bb6cbd15d42234d353e42bc7

Contents?: true

Size: 1008 Bytes

Versions: 2

Compression:

Stored size: 1008 Bytes

Contents

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

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

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

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

    alias_method :request, :image_request
    it_behaves_like 'illustrations'
  end

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

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

    alias_method :request, :image_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/image/requests/_request.html.erb_spec.rb
tasuku-1.0.1 spec/views/tasuku/taskables/image/requests/_request.html.erb_spec.rb