|
4 | 4 | RSpec.describe Team do |
5 | 5 | include TeamBuilder |
6 | 6 |
|
7 | | - it 'returns its id' do |
8 | | - team = build_team(id: '42', name: 'Platform') |
9 | | - |
10 | | - expect(team.id).to eq('42') |
11 | | - end |
12 | | - |
13 | | - it 'defaults id to nil' do |
14 | | - team = build_team(name: 'Platform') |
15 | | - |
16 | | - expect(team.id).to be_nil |
17 | | - end |
18 | | - |
19 | | - it 'converts id to string' do |
20 | | - team = build_team(id: 42, name: 'Platform') |
21 | | - |
22 | | - expect(team.id).to eq('42') |
23 | | - end |
24 | | - |
25 | | - it 'returns its name' do |
26 | | - team = build_team(name: 'Platform') |
27 | | - |
28 | | - expect(team.name).to eq('Platform') |
29 | | - end |
30 | | - |
31 | | - it 'returns its description' do |
32 | | - team = build_team(name: 'Platform', description: 'Enable delivery velocity') |
33 | | - |
34 | | - expect(team.description).to eq('Enable delivery velocity') |
35 | | - end |
36 | | - |
37 | | - it 'defaults description to an empty string' do |
38 | | - team = build_team(name: 'Platform') |
39 | | - |
40 | | - expect(team.description).to eq('') |
41 | | - end |
42 | | - |
43 | | - it 'returns its point of contact' do |
44 | | - team = build_team(name: 'Platform', point_of_contact: 'Jordan') |
45 | | - |
46 | | - expect(team.point_of_contact).to eq('Jordan') |
47 | | - end |
48 | | - |
49 | | - it 'defaults point_of_contact to an empty string' do |
50 | | - team = build_team(name: 'Platform') |
51 | | - |
52 | | - expect(team.point_of_contact).to eq('') |
53 | | - end |
54 | | - |
55 | | - it 'records whether it has been archived' do |
56 | | - team = build_team(name: 'Platform', archived: true) |
57 | | - |
58 | | - expect(team).to be_archived |
59 | | - end |
60 | | - |
61 | | - it 'defaults archived to false' do |
62 | | - team = build_team(name: 'Platform') |
63 | | - |
64 | | - expect(team).not_to be_archived |
65 | | - end |
66 | | - |
67 | 7 | it 'is valid when it has a name' do |
68 | 8 | team = build_team(name: 'Platform') |
69 | 9 |
|
|
0 commit comments