Sha256: d45f863eb494b406c546667c7c5ade47eca394044f6df635165106573df342ac

Contents?: true

Size: 644 Bytes

Versions: 1

Compression:

Stored size: 644 Bytes

Contents

require 'spec_helper'

module Logical
  module Naf
    module JobStatuses

      describe Terminated do

        context "no conditions" do
          
          let!(:conditions) { "" }

          it "returns executable query" do
            expect { ActiveRecord::Base.connection.execute(Terminated.all(conditions)) }.to_not raise_error
          end

        end

        context "with conditions" do

          let!(:conditions) { "TEST STRING" }

          it "adds conditions to returned sql string" do
            expect(Terminated.all(conditions).include?(conditions)).to be_true
          end

        end

      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
naf-2.1.13 spec/models/logical/naf/job_statuses/terminated_spec.rb