Class: TaskMapper::Provider::Tester::Comment

Inherits:
Base::Comment
  • Object
show all
Defined in:
lib/taskmapper/tester/comment.rb

Overview

This is the Comment class for the Tester provider

Constant Summary

Constants inherited from Base::Comment

Base::Comment::API

Instance Attribute Summary

Attributes inherited from Base::Comment

#system, #system_data

Instance Method Summary collapse

Methods inherited from Base::Comment

find, find_by_attributes, find_by_id, first, last, search

Methods included from Helper

#easy_finder, #filter_string, #provider_parent, #search_by_attribute, #search_filter, #this_method

Methods included from Common

#destroy, included, #respond_to?, #save, #update!

Constructor Details

#initialize(project_id, ticket_id, *options) ⇒ Comment

You don’t need to define an initializer, this is only here to initialize tester data



7
8
9
10
11
12
13
14
# File 'lib/taskmapper/tester/comment.rb', line 7

def initialize(project_id, ticket_id, *options)
  data = {:id => rand(1000), :status => ['lol', 'rofl', 'lmao', 'lamo', 'haha', 'heh'][rand(6)],
    :priority => rand(10), :summary => 'Tickets ticket ticket ticket', :resolution => false,
    :created_at => Time.now, :updated_at => Time.now, :description => 'Ticket ticket ticket ticket laughing',
    :assignee => 'lol-man'}
  @system = :tester
  super(data.merge(options.first || {}))
end