-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🧹
Marketplace
: Remove Controller#update
and unused .settings
- #1511 Now that the `Marketplace` no longer has any user modifiable attributes, I got rid of all the leftovers.
- Loading branch information
Showing
8 changed files
with
7 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,18 +22,6 @@ | |
end | ||
end | ||
|
||
describe "#update" do | ||
before { sign_in(space, member) } | ||
|
||
it "updates the attributes" do | ||
marketplace_attributes = attributes_for(:marketplace, notify_emails: "[email protected]") | ||
put polymorphic_path(marketplace.location), params: {marketplace: marketplace_attributes} | ||
marketplace.reload | ||
|
||
expect(marketplace.notify_emails).to eq(marketplace_attributes[:notify_emails]) | ||
end | ||
end | ||
|
||
describe "#show" do | ||
it "does not show guests the edit button" do | ||
get polymorphic_path(marketplace.location) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
require "rails_helper" | ||
|
||
RSpec.describe Marketplace::Order::ReceivedMailer, type: :mailer do | ||
let(:marketplace) { create(:marketplace, notify_emails: "[email protected],[email protected]") } | ||
let(:marketplace) { create(:marketplace) } | ||
let(:order) { build(:marketplace_order, placed_at: 1.hour.ago, marketplace: marketplace) } | ||
|
||
describe "#notification" do | ||
subject(:notification) { described_class.notification(order) } | ||
|
||
it { is_expected.to be_to(marketplace.notify_emails.split(",")) } | ||
|
||
context "when the marketplace has a order notification contact location" do | ||
before do | ||
marketplace.notification_methods.create(contact_location: "[email protected]") | ||
end | ||
|
||
it { is_expected.to be_to(marketplace.notify_emails.split(",") + marketplace.notification_methods.map(&:contact_location)) } | ||
before do | ||
marketplace.notification_methods.create(contact_location: "[email protected]") | ||
end | ||
|
||
it { is_expected.to be_to(marketplace.notification_methods.map(&:contact_location)) } | ||
|
||
it { is_expected.to have_subject(t(".notification.subject", marketplace_name: order.marketplace_name, order_id: order.id)) } | ||
|
||
specify do | ||
|