0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-09 20:02:54 +01:00

modified spec to confirm working for multiple users and groups

Dieser Commit ist enthalten in:
Faizaan Gagan 2021-04-15 02:15:20 +05:30
Ursprung f443840358
Commit ce222c0c04
2 geänderte Dateien mit 6 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -93,6 +93,8 @@ describe CustomWizard::Action do
it 'allows using multiple PM targets' do
User.create(username: 'angus1', email: "angus1@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.create_updater(wizard.steps[0].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.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)
end
end

Datei anzeigen

@ -485,7 +485,9 @@
"output_connector": "set",
"output": [
"angus1",
"faiz"
"faiz",
"cool_group",
"cool_group_1"
]
}
]