Sha256: 199d979cfaeb409d43241310c67f9a35b02666f3d95b67abe511982cbd642b40

Contents?: true

Size: 762 Bytes

Versions: 4

Compression:

Stored size: 762 Bytes

Contents

require "helper"

module Dovico
  describe Dovico::TimeEntryFormatter do
    let(:task) { Dovico::Task.new(id: "1212", name: "TestTask") }
    let(:project) { Dovico::Project.new(id: "9898", name: "TestProject", tasks: [task]) }
    let(:time_entry) do
      Dovico::TimeEntry.new(
        project_id: "9898",
        task_id: "1212",
        start_time: "0900",
        stop_time: "1200",
        total_hours: "3",
        sheet_status: "U"
      )
    end

    subject do
      Dovico::TimeEntryFormatter.new([project])
    end

    describe "#format_entries" do
      it 'returns formatted tasks' do
        expect(subject.format_entries([time_entry])).to eq(' [××××××]            : [under_review]  3h TestProject TestTask')
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dovico-1.4.0 spec/unit/dovico/model/time_entry_formatter_spec.rb
dovico-1.3.0 spec/unit/dovico/model/time_entry_formatter_spec.rb
dovico-1.2.0 spec/unit/dovico/model/time_entry_formatter_spec.rb
dovico-1.1.0 spec/unit/dovico/model/time_entry_formatter_spec.rb