Sha256: 822f97d072d6625951b4afb50ee6c4c56253129553dcf2d9e7c782d04021fad8

Contents?: true

Size: 858 Bytes

Versions: 8

Compression:

Stored size: 858 Bytes

Contents

require 'spec_helper'

require_relative '../../../lib/locomotive/steam/middlewares/thread_safe'
require_relative '../../../lib/locomotive/steam/middlewares/helpers'
require_relative '../../../lib/locomotive/steam/middlewares/auth'

describe Locomotive::Steam::Middlewares::Auth::AuthOptions do

  let(:metafields)  { { 'smtp' => { 'address' => '127.0.0.1', 'user_name' => 'John', 'password' => 'doe', 'port' => 25 } } }
  let(:site)        { instance_double('Site', metafields: metafields) }
  let(:params)      { {} }

  let(:options) { described_class.new(site, params) }

  describe '#smtp' do

    subject { options.smtp }

    it { is_expected.to eq('address': '127.0.0.1', 'user_name': 'John', 'password': 'doe', 'port': 25) }

    context 'no smtp metafields' do

      let(:metafields) { {} }

      it { is_expected.to eq({}) }

    end

  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
locomotivecms_steam-1.4.1 spec/unit/middlewares/auth_spec.rb
locomotivecms_steam-1.4.0 spec/unit/middlewares/auth_spec.rb
locomotivecms_steam-1.4.0.rc2 spec/unit/middlewares/auth_spec.rb
locomotivecms_steam-1.4.0.rc1 spec/unit/middlewares/auth_spec.rb
locomotivecms_steam-1.4.0.pre.rc.1 spec/unit/middlewares/auth_spec.rb
locomotivecms_steam-1.3.0 spec/unit/middlewares/auth_spec.rb
locomotivecms_steam-1.3.0.rc2 spec/unit/middlewares/auth_spec.rb
locomotivecms_steam-1.3.0.rc1 spec/unit/middlewares/auth_spec.rb