                                {:from addr0})))
     (testing "Offering the name with overdue endtime fails"
       (is (thrown? :default (auction-offering-factory/create-offering!
-                              {:offering/name "abc.eth"
-                               :offering/price (eth->wei 0.1)
-                               :auction-offering/end-time (to-epoch (time/minus (now) (time/seconds 1)))
-                               :auction-offering/extension-duration 0
-                               :auction-offering/min-bid-increase (web3/to-wei 0.1 :ether)}
-                              {:from addr0}))))
+                             {:offering/name "abc.eth"
+                              :offering/price (eth->wei 0.1)
+                              :auction-offering/end-time (to-epoch (time/minus (now) (time/seconds 1)))
+                              :auction-offering/extension-duration 0
+                              :auction-offering/min-bid-increase (web3/to-wei 0.1 :ether)}
+                             {:from addr0}))))
     (testing "Offering the name with 0 bidincrease fails"
       (is (thrown? :default (auction-offering-factory/create-offering!
-                              {:offering/name "abc.eth"
-                               :offering/price (eth->wei 0.1)
-                               :auction-offering/end-time (to-epoch (time/plus (now) (time/weeks 1)))
-                               :auction-offering/extension-duration 0
-                               :auction-offering/min-bid-increase (web3/to-wei 0 :ether)}
-                              {:from addr0}))))
+                             {:offering/name "abc.eth"
+                              :offering/price (eth->wei 0.1)
+                              :auction-offering/end-time (to-epoch (time/plus (now) (time/weeks 1)))
+                              :auction-offering/extension-duration 0
+                              :auction-offering/min-bid-increase (web3/to-wei 0 :ether)}
+                             {:from addr0}))))
     (let [tx-hash (auction-offering-factory/create-offering!
-                    {:offering/name "abc.eth"
-                     :offering/price (eth->wei 0.1)
-                     :auction-offering/end-time (to-epoch (time/plus (now) (time/weeks 2)))
-                     :auction-offering/extension-duration 0
-                     :auction-offering/min-bid-increase (web3/to-wei 0.1 :ether)}
-                    {:from addr0})]
+                   {:offering/name "abc.eth"
+                    :offering/price (eth->wei 0.1)
+                    :auction-offering/end-time (to-epoch (time/plus (now) (time/weeks 2)))
+                    :auction-offering/extension-duration 0
+                    :auction-offering/min-bid-increase (web3/to-wei 0.1 :ether)}
+                   {:from addr0})]
       (testing "Offering the name for a bid"
         (is tx-hash))
 
       (let [{{:keys [:offering]} :args}
             (offering-registry/on-offering-added-in-tx tx-hash {:node (namehash "abc.eth")
                                                                 :from-block 0
-                                                                :owner addr0})]
+                                                                :owner addr0})
+            bid-value-user-2 (web3/to-wei 0.2 :ether)]
         (testing "on-offering event should fire"
           (is (not (nil? offering))))
         (when offering

           {:web3 {:port 8549}
            :smart-contracts {:contracts-var #'name-bazaar.shared.smart-contracts/smart-contracts
                              :auto-mining? true}})
       (mount/only [#'district.server.web3
                    #'district.server.smart-contracts/smart-contracts
                    #'name-bazaar.server.deployer/deployer])
       (mount/start)))
   :after
   (fn []
     (mount/stop)

                               {:from addr0})))
    (testing "Offering with the endtime too far in the future fails"
      (is (thrown? :default (auction-offering-factory/create-offering!
                             {:offering/name "abc.eth"
                              :offering/price (eth->wei 0.1)
                              :auction-offering/end-time (to-epoch (time/plus (now)
                                                                              (time/days (* 4 30))
                                                                              (time/hours 1)))
                              :auction-offering/extension-duration 0
                              :auction-offering/min-bid-increase (web3/to-wei 0.1 :ether)}
                             {:from addr0}))))
    (testing "Offering with the extension duration longer than auction duration fails"
      (is (thrown? :default (auction-offering-factory/create-offering!
                             {:offering/name "abc.eth"
                              :offering/price (eth->wei 0.1)
                              :auction-offering/end-time (to-epoch (time/plus (now) (time/days (* 2 30))))
                              :auction-offering/extension-duration (time/in-seconds (time/days 61))
                              :auction-offering/min-bid-increase (web3/to-wei 0.1 :ether)}
                             {:from addr0}))))))
