Skip to content

Commit

Permalink
invitation form specs
Browse files Browse the repository at this point in the history
  • Loading branch information
santiago-dev96 committed Jan 22, 2020
1 parent d59e3f6 commit b574bf0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions spec/views/events/show.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,24 @@
)
end
end

context 'invitations' do
it 'displays a form pointing to users/:id/invite' do
expect(rendered).to match(
Regexp.new(
".*<form.*action=\"#{invite_user_path(@event.user)}\".*>.*</form>",
1 | 4
)
)
end

it 'displays a text field for inviteds' do
expect(rendered).to match(
Regexp.new(
".*<form.*>.*<input.*type=\"text\".*name=\"invitation[users]\".*>.*</form>.*",
1 | 4
)
)
end
end
end

0 comments on commit b574bf0

Please sign in to comment.