Sha256: b74210c522f83af01450b7016bf3bbfca7474a1e07eaa33f922658b71973481d

Contents?: true

Size: 1 KB

Versions: 30

Compression:

Stored size: 1 KB

Contents

require 'spec_helper'

describe WoopleTheme::Dashboard::AccountUserPresenter do
  describe '#image' do
    context 'no image' do
      subject do
        data = OpenStruct.new image: '/assets/retina_thumb/missing.png', name: 'GOATSE', member_dashboard_path: 'GOATSE', status_color: :red, status_description: 'GOATSE', reminder_path: 'GOATSE'
        WoopleTheme::Dashboard::AccountUserPresenter.new(data).image
      end

      it 'returns the missing profile path' do
        should eq 'woople-theme/missing-profile.png'
      end
    end

    context 'has image' do
      profile_image_url = 'https://woople.s3.amazonaws.com/gwar.jpg'

      subject do
        data = OpenStruct.new image: profile_image_url, name: 'GOATSE', member_dashboard_path: 'GOATSE', status_color: :red, status_description: 'GOATSE', reminder_path: 'GOATSE'
        WoopleTheme::Dashboard::AccountUserPresenter.new(data).image
      end

      it 'returns the profile image url as is' do
        should eq profile_image_url
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
woople-theme-0.10.0 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.9.0 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.19 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.18 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.17 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.16 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.15 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.14 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.13 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.12 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.11 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.10 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.9 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.8 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.7 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.6 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.5 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.4 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.3 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb
woople-theme-0.8.2 spec/presenters/woople_theme/dashboard/account_user_presenter_spec.rb