require File.dirname(__FILE__) + '/../test_helper' class BoardTest < ActiveSupport::TestCase fixtures :projects, :boards, :messages def setup @project = Project.find(1) end def test_create board = Board.new(:project => @project, :name => 'Test board', :description => 'Test board description') assert board.save board.reload assert_equal 'Test board', board.name assert_equal 'Test board description', board.description assert_equal @project, board.project assert_equal 0, board.topics_count assert_equal 0, board.messages_count assert_nil board.last_message # last position assert_equal @project.boards.size, board.position end def test_destroy board = Board.find(1) assert board.destroy # make sure that the associated messages are removed assert_equal 0, Message.count(:conditions => {:board_id => 1}) end end 27-shared-null-storage-merged'>27-shared-null-storage-merged Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller/OCJSController.php
blob: 71f0941b46ce130e01c46fe54a6399dcc6b24f06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110