* Update data exporter to handle admin send * Match button with everything else * Use proper redirect path * Stub SiteConfig definition instead of setting it Co-authored-by: Mac Siri <krairit.siri@gmail.com> * Removed if statement by accident oops * Remove non-functional boolean param and pass email directly * Use refinement to conv to boolean instead of JSON.parse * Rename to StringToBoolean * Use 'using' in proper scope (not in method) * Rename to_bool to to_boolean * Refactor if statement, thanks rhymes! * Fix small bugs in tests * Remove tracking for export_email b/c no @user Co-authored-by: Mac Siri <krairit.siri@gmail.com>
10 lines
235 B
Ruby
10 lines
235 B
Ruby
require "rails_helper"
|
|
|
|
RSpec.describe StringToBoolean, type: :refinement do
|
|
describe "#to_boolean" do
|
|
using described_class
|
|
it "converts a string to a boolean" do
|
|
expect("true".to_boolean).to be true
|
|
end
|
|
end
|
|
end
|