Sha256: 6ad08a19f9453c43b0b892ab350a437b54272590960a4b8a668a9399f613c34d

Contents?: true

Size: 868 Bytes

Versions: 4

Compression:

Stored size: 868 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'

class ChiliVideosTest < ActiveSupport::TestCase
  setup do
    Setting["plugin_chili_videos"] = HashWithIndifferentAccess.new({:transloadit_api_key => 'api_key', :transloadit_workflow => 'workflow'})
  end

  context '.configured?' do
    context "when all required settings are stored" do
      should "return true" do
        assert ChiliVideos.configured?
      end
    end

    context "when 'transloadit_api_key' is not set" do
      should 'returns false' do
        Setting["plugin_chili_videos"]['transloadit_api_key'] = ''
        assert !ChiliVideos.configured?
      end
    end

    context "when 'transloadit_workflow' is not set" do
      should 'returns false' do
        Setting["plugin_chili_videos"]['transloadit_workflow'] = ''
        assert !ChiliVideos.configured?
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
chili_videos-0.2.2 test/unit/chili_video_plugin_test.rb
chili_videos-0.2.1 test/unit/chili_video_plugin_test.rb
chili_videos-0.2.0 test/unit/chili_video_plugin_test.rb
chili_videos-0.1.0 test/unit/chili_video_plugin_test.rb