mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
Add universes to content feature tests
This commit is contained in:
parent
d1412624ae
commit
cd6bc7c648
@ -15,6 +15,7 @@ Feature: Character sheets
|
||||
| character |
|
||||
| location |
|
||||
| item |
|
||||
| universe |
|
||||
|
||||
Scenario Outline: I change my content's name
|
||||
Given I have created a <content_type>
|
||||
@ -26,3 +27,4 @@ Feature: Character sheets
|
||||
| character |
|
||||
| location |
|
||||
| item |
|
||||
| universe |
|
||||
|
||||
@ -7,21 +7,21 @@ When 'I am logged-in' do
|
||||
click_button 'Log in'
|
||||
end
|
||||
|
||||
When /^I create a (character|location|item)$/ do |model|
|
||||
When /^I create a (character|location|item|universe)$/ do |model|
|
||||
visit new_polymorphic_path(model)
|
||||
fill_in "#{model}_name", with: 'My new content'
|
||||
click_on "Create #{model.titlecase}"
|
||||
end
|
||||
|
||||
Then /^that (character|location|item) should be saved$/ do |model|
|
||||
Then /^that (character|location|item|universe) should be saved$/ do |model|
|
||||
expect(@user.send(model.pluralize).length).to eq(1)
|
||||
end
|
||||
|
||||
Given /^I have created a (character|location|item)$/ do |model|
|
||||
Given /^I have created a (character|location|item|universe)$/ do |model|
|
||||
@model = create(model.to_sym, user: @user)
|
||||
end
|
||||
|
||||
When /^I change my (character|location|item)\'s name$/ do |model|
|
||||
When /^I change my (character|location|item|universe)\'s name$/ do |model|
|
||||
visit polymorphic_path(@model)
|
||||
click_on "Edit this #{model}"
|
||||
fill_in "#{model}_name", with: 'My changed name'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user