| 44 |
44 |
def gantt_start
|
| 45 |
45 |
@gantt.date_from
|
| 46 |
46 |
end
|
|
47 |
private :gantt_start
|
|
48 |
|
|
49 |
def gantt_end
|
|
50 |
@gantt.date_to
|
|
51 |
end
|
|
52 |
private :gantt_end
|
| 47 |
53 |
|
| 48 |
54 |
# Creates a Gantt chart for a 4 week span
|
| 49 |
55 |
def create_gantt(project=Project.generate!, options={})
|
| ... | ... | |
| 422 |
428 |
test "#line starting marker should appear at the start date" do
|
| 423 |
429 |
create_gantt
|
| 424 |
430 |
@output_buffer = @gantt.line(today - 7, today + 7, 30, true, 'line', :format => :html, :zoom => 4)
|
| 425 |
|
assert_select "div.starting", 1
|
| 426 |
431 |
assert_select 'div.starting[style*="left:28px"]', 1
|
|
432 |
@output_buffer = @gantt.line(gantt_start, today + 7, 30, true, 'line', :format => :html, :zoom => 4)
|
|
433 |
assert_select 'div.starting[style*="left:0px"]', 1
|
| 427 |
434 |
end
|
| 428 |
435 |
|
| 429 |
436 |
test "#line starting marker should not appear if the start date is before gantt start date" do
|
| ... | ... | |
| 435 |
442 |
test "#line ending marker should appear at the end date" do
|
| 436 |
443 |
create_gantt
|
| 437 |
444 |
@output_buffer = @gantt.line(today - 7, today + 7, 30, true, 'line', :format => :html, :zoom => 4)
|
| 438 |
|
assert_select "div.ending", 1
|
| 439 |
445 |
assert_select 'div.ending[style*="left:88px"]', 1
|
|
446 |
@output_buffer = @gantt.line(today - 7, gantt_end, 30, true, 'line', :format => :html, :zoom => 4)
|
|
447 |
assert_select 'div.ending[style*="left:116px"]', 1
|
| 440 |
448 |
end
|
| 441 |
449 |
|
| 442 |
450 |
test "#line ending marker should not appear if the end date is before gantt start date" do
|