@@ -67,7 +67,7 @@ describe Agents::BasecampAgent do |
||
67 | 67 |
|
68 | 68 |
describe "#complete_project_id" do |
69 | 69 |
it "should return a array of hashes" do |
70 |
- expect(@checker.complete_project_id).to eq [{name: 'test (1234)', value: 1234}, {name: 'test1 (1235)', value: 1235}] |
|
70 |
+ expect(@checker.complete_project_id).to eq [{text: 'test (1234)', id: 1234}, {text: 'test1 (1235)', id: 1235}] |
|
71 | 71 |
end |
72 | 72 |
end |
73 | 73 |
|
@@ -71,7 +71,7 @@ describe Agents::HipchatAgent do |
||
71 | 71 |
any_instance_of(HipChat::Client) do |klass| |
72 | 72 |
stub(klass).rooms { [OpenStruct.new(name: 'test'), OpenStruct.new(name: 'test1')] } |
73 | 73 |
end |
74 |
- expect(@checker.complete_room_name).to eq [{name: 'test', value: 'test'},{name: 'test1', value: 'test1'}] |
|
74 |
+ expect(@checker.complete_room_name).to eq [{text: 'test', id: 'test'},{text: 'test1', id: 'test1'}] |
|
75 | 75 |
end |
76 | 76 |
end |
77 | 77 |
|
@@ -16,25 +16,25 @@ describe FormConfigurableAgentPresenter do |
||
16 | 16 |
|
17 | 17 |
it "works for the type :string" do |
18 | 18 |
expect(@presenter.option_field_for(:string)).to( |
19 |
- have_tag('input', with: {:'data-attribute' => 'string', role: 'validatable', type: 'text', name: 'agent[options][string]'}) |
|
19 |
+ have_tag('input', with: {:'data-attribute' => 'string', role: 'validatable form-configurable', type: 'text', name: 'agent[options][string]'}) |
|
20 | 20 |
) |
21 | 21 |
end |
22 | 22 |
|
23 | 23 |
it "works for the type :text" do |
24 | 24 |
expect(@presenter.option_field_for(:text)).to( |
25 |
- have_tag('textarea', with: {:'data-attribute' => 'text', role: 'completable', name: 'agent[options][text]'}) |
|
25 |
+ have_tag('textarea', with: {:'data-attribute' => 'text', role: 'completable form-configurable', name: 'agent[options][text]'}) |
|
26 | 26 |
) |
27 | 27 |
end |
28 | 28 |
|
29 | 29 |
it "works for the type :boolean" do |
30 | 30 |
expect(@presenter.option_field_for(:boolean)).to( |
31 |
- have_tag('input', with: {:'data-attribute' => 'boolean', role: '', name: 'agent[options][boolean]', type: 'radio'}) |
|
31 |
+ have_tag('input', with: {:'data-attribute' => 'boolean', role: 'form-configurable', name: 'agent[options][boolean_radio]', type: 'radio'}) |
|
32 | 32 |
) |
33 | 33 |
end |
34 | 34 |
|
35 |
- it "works for the type :boolean" do |
|
35 |
+ it "works for the type :array" do |
|
36 | 36 |
expect(@presenter.option_field_for(:array)).to( |
37 |
- have_tag('select', with: {:'data-attribute' => 'array', role: '', name: 'agent[options][array]'}) |
|
37 |
+ have_tag('input', with: {:'data-attribute' => 'array', role: 'completable form-configurable', type: 'text', name: 'agent[options][array]'}) |
|
38 | 38 |
) |
39 | 39 |
end |
40 | 40 |
end |