modified spec to confirm working for multiple users and groups
Dieser Commit ist enthalten in:
Ursprung
f443840358
Commit
ce222c0c04
2 geänderte Dateien mit 6 neuen und 1 gelöschten Zeilen
|
@ -93,6 +93,8 @@ describe CustomWizard::Action do
|
||||||
it 'allows using multiple PM targets' do
|
it 'allows using multiple PM targets' do
|
||||||
User.create(username: 'angus1', email: "angus1@email.com")
|
User.create(username: 'angus1', email: "angus1@email.com")
|
||||||
User.create(username: 'faiz', email: "faiz@email.com")
|
User.create(username: 'faiz', email: "faiz@email.com")
|
||||||
|
Group.create(name: "cool_group")
|
||||||
|
Group.create(name: 'cool_group_1')
|
||||||
wizard = CustomWizard::Builder.new(@template[:id], user).build
|
wizard = CustomWizard::Builder.new(@template[:id], user).build
|
||||||
wizard.create_updater(wizard.steps[0].id, {}).update
|
wizard.create_updater(wizard.steps[0].id, {}).update
|
||||||
wizard.create_updater(wizard.steps[1].id, {}).update
|
wizard.create_updater(wizard.steps[1].id, {}).update
|
||||||
|
@ -108,6 +110,7 @@ describe CustomWizard::Action do
|
||||||
)
|
)
|
||||||
expect(topic.exists?).to eq(true)
|
expect(topic.exists?).to eq(true)
|
||||||
expect(topic.first.all_allowed_users.map(&:username)).to include('angus1', 'faiz')
|
expect(topic.first.all_allowed_users.map(&:username)).to include('angus1', 'faiz')
|
||||||
|
expect(topic.first.allowed_groups.map(&:name)).to include('cool_group', 'cool_group_1')
|
||||||
expect(post.exists?).to eq(true)
|
expect(post.exists?).to eq(true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
4
spec/fixtures/wizard.json
gevendort
4
spec/fixtures/wizard.json
gevendort
|
@ -485,7 +485,9 @@
|
||||||
"output_connector": "set",
|
"output_connector": "set",
|
||||||
"output": [
|
"output": [
|
||||||
"angus1",
|
"angus1",
|
||||||
"faiz"
|
"faiz",
|
||||||
|
"cool_group",
|
||||||
|
"cool_group_1"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Laden …
In neuem Issue referenzieren