Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions app/views/partners/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<%= f.input_field :email, class: "form-control" %>
<% end %>

<%= submit_button %>
<% end %>

</div>
<%= submit_button({text: "Send Invitation", icon: "envelope"}) %>
<% end %>
</div>
8 changes: 4 additions & 4 deletions spec/features/partner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
visit url_prefix + "/partners/new"
fill_in "Name", with: "Frank"
fill_in "E-mail", with: "frank@frank.com"
click_button "Save"
click_button "Send Invitation"

expect(page.find(".alert")).to have_content "added"
end

scenario "User creates a new partner with empty name" do
visit url_prefix + "/partners/new"
click_button "Save"
click_button "Send Invitation"

expect(page.find(".alert")).to have_content "didn't work"
end
Expand All @@ -38,7 +38,7 @@
partner = create(:partner, name: "Frank")
visit url_prefix + "/partners/#{partner.id}/edit"
fill_in "Name", with: "Franklin"
click_button "Save"
click_button "Send Invitation"

expect(page.find(".alert")).to have_content "updated"
partner.reload
Expand All @@ -49,7 +49,7 @@
partner = create(:partner, name: "Frank")
visit url_prefix + "/partners/#{partner.id}/edit"
fill_in "Name", with: ""
click_button "Save"
click_button "Send Invitation"

expect(page.find(".alert")).to have_content "didn't work"
end
Expand Down